Class ApiErrorException
Special Exception to transport the ApiErrorItem.
Inheritance
System.Object
System.Exception
ApiErrorException
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: Unosquare.PassCore.Common
Syntax
public class ApiErrorException : Exception, ISerializable, _Exception
Constructors
ApiErrorException(String, ApiErrorCode)
Initializes a new instance of the ApiErrorException class.
Declaration
public ApiErrorException(string message, ApiErrorCode errorCode = ApiErrorCode.Generic)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
ApiErrorCode | errorCode | The error code. |
Properties
ErrorCode
Gets or sets the error code.
Declaration
public ApiErrorCode ErrorCode { get; }
Property Value
Type | Description |
---|---|
ApiErrorCode | The error code. |
Message
Declaration
public override string Message { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
System.Exception.Message
Methods
ToApiErrorItem()
To the API error item.
Declaration
public ApiErrorItem ToApiErrorItem()
Returns
Type | Description |
---|---|
ApiErrorItem | An API Error Item. |
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception