Class ApiException
Exception thrown when an API error occurs
Inheritance
Implements
Namespace: Seltzr.Exceptions
Assembly: Seltzr.dll
Syntax
public class ApiException : Exception, ISerializable
Remarks
When this exception is thrown, it indicates that an error occurred processing the request, but that the error contains no sensitive data and should be communicated to the API consumer.
Constructors
Initializes a new instance of the ApiException class
public ApiException()
Initializes a new instance of the ApiException class
public ApiException(int errorCode)
Parameters
errorCode
Int32
A unique error code for the error that occurred
Initializes a new instance of the ApiException class
public ApiException(string message)
Parameters
message
String
A message explaining the exception
Initializes a new instance of the ApiException class
public ApiException(string message, Exception inner)
Parameters
message
String
A message explaining the exception
inner
Exception
The inner exception that caused this one
Initializes a new instance of the ApiException class
public ApiException(string message, Exception inner, int errorCode)
Parameters
message
String
A message explaining the exception
inner
Exception
The inner exception that caused this one
errorCode
Int32
A unique error code for the error that occurred
Initializes a new instance of the ApiException class
public ApiException(string message, int errorCode)
Parameters
message
String
A message explaining the exception
errorCode
Int32
A unique error code for the error that occurred
Properties
Gets or sets a unique code for the error that occurred
public int ErrorCode { get; set; }