Class ApiException
Thrown when a cal to an API function fails.
Namespace: Colore.Api
Assembly: Colore.dll
Syntax
public class ApiException : ColoreException
Constructors
ApiException()
Initializes a new instance of the ApiException class.
Declaration
public ApiException()
ApiException(SerializationInfo, StreamingContext)
Initializes a new instance of the ApiException class with serialized data.
Declaration
protected ApiException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
SerializationException | The class name is null or HResult is zero (0). |
ApiException(String)
Initializes a new instance of the ApiException class.
Declaration
public ApiException(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | Message describing the exception. |
ApiException(String, Result)
Initializes a new instance of the ApiException class.
Declaration
public ApiException(string message, Result result)
Parameters
Type | Name | Description |
---|---|---|
String | message | An error message detailing the exception. |
Result | result | The result code returned from the SDK. |
ApiException(String, Exception)
Initializes a new instance of the ApiException class.
Declaration
public ApiException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
String | message | Message describing the exception. |
Exception | innerException | Inner exception. |
Properties
Result
Gets the result code returned by the SDK.
Declaration
public int Result { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
GetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the SerializationInfo with information about the exception.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |