Class RestException
Represents an error in the Chroma REST API.
Inherited Members
Namespace: Colore.Rest
Assembly: Colore.dll
Syntax
public sealed class RestException : ApiException
Constructors
RestException()
Initializes a new instance of the RestException class.
Declaration
public RestException()
RestException(String)
Initializes a new instance of the RestException class.
Declaration
public RestException(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | Exception message. |
RestException(String, Result, Uri, HttpStatusCode, String)
Initializes a new instance of the RestException class.
Declaration
public RestException(string message, Result result, Uri uri, HttpStatusCode statusCode, string restData = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Exception message. |
Result | result | The result code returned from the Chroma SDK. |
Uri | uri | The REST API URI where the exception occurred. |
HttpStatusCode | statusCode | HTTP status code returned by the API. |
String | restData | Any data returned in the API response body. |
RestException(String, Exception)
Initializes a new instance of the RestException class.
Declaration
public RestException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
String | message | Exception message. |
Exception | innerException | Inner exception. |
Properties
RestData
Gets the data (if any) returned by the API.
Declaration
public string RestData { get; }
Property Value
Type | Description |
---|---|
String |
StatusCode
Gets the HttpStatusCode returned by the API.
Declaration
public HttpStatusCode StatusCode { get; }
Property Value
Type | Description |
---|---|
HttpStatusCode |
Uri
Gets the Uri called which caused the exception.
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
Uri |
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. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |