C# Client Library
A C# Client Library for the AnalyzeRe REST API
AnalyzeRe.APIRequestException Class Reference

A custom exception class that includes the RestSharp.IRestResponse that generated the exception, and the detailed ServerError returned, if available. More...

Public Member Functions

 APIRequestException (string message, Exception innerException=null, IRestResponse restResponse=null, ServerError serverError=null)
 Construct a new APIRequestException. More...
 
override string ToString ()
 Creates and returns a string representation of the current exception that includes a summary of the RestResponse and ServerError if available. More...
 

Properties

IRestResponse RestResponse [get, set]
 The IRestResponse that generated this exception. More...
 
ServerError ServerError [get, set]
 The ServerError object parsed from the response body, if available. More...
 

Detailed Description

A custom exception class that includes the RestSharp.IRestResponse that generated the exception, and the detailed ServerError returned, if available.

APIRequestException does not need to be Serializable

Definition at line 16 of file APIRequestException.cs.

Inheritance diagram for AnalyzeRe.APIRequestException:

Constructor & Destructor Documentation

AnalyzeRe.APIRequestException.APIRequestException ( string  message,
Exception  innerException = null,
IRestResponse  restResponse = null,
ServerError  serverError = null 
)
inline

Construct a new APIRequestException.

Parameters
messageThe message that describes the error.
innerException(Optional) The exception that is the cause of the current exception.
restResponseThe IRestResponse that generated this exception.
serverErrorThe ServerError object parsed from the response body, if available.

Definition at line 33 of file APIRequestException.cs.

Member Function Documentation

override string AnalyzeRe.APIRequestException.ToString ( )
inline

Creates and returns a string representation of the current exception that includes a summary of the RestResponse and ServerError if available.

Returns
A string representation of the current exception.

Definition at line 47 of file APIRequestException.cs.

Property Documentation

IRestResponse AnalyzeRe.APIRequestException.RestResponse
getset

The IRestResponse that generated this exception.

Definition at line 19 of file APIRequestException.cs.

ServerError AnalyzeRe.APIRequestException.ServerError
getset

The ServerError object parsed from the response body, if available.

Definition at line 23 of file APIRequestException.cs.


The documentation for this class was generated from the following file: