Class GorgonException
A custom exception that allows the passing of a GorgonResult code.
Inherited Members
Namespace: Gorgon.Core
Assembly: Gorgon.Core.dll
Syntax
[Serializable]
public class GorgonException : Exception, ISerializable, _Exception
Constructors
| Edit this page View SourceGorgonException()
Default constructor.
Declaration
public GorgonException()
GorgonException(GorgonResult)
Initializes a new instance of the GorgonException class.
Declaration
public GorgonException(GorgonResult result)
Parameters
Type | Name | Description |
---|---|---|
GorgonResult | result | The result. |
GorgonException(GorgonResult, Exception)
Initializes a new instance of the GorgonException class.
Declaration
public GorgonException(GorgonResult result, Exception inner)
Parameters
Type | Name | Description |
---|---|---|
GorgonResult | result | The result. |
Exception | inner | The inner exception. |
GorgonException(GorgonResult, string)
Initializes a new instance of the GorgonException class.
Declaration
public GorgonException(GorgonResult result, string message)
Parameters
Type | Name | Description |
---|---|---|
GorgonResult | result | The result. |
string | message | Message data to append to the error. |
GorgonException(GorgonResult, string, Exception)
Initializes a new instance of the GorgonException class.
Declaration
public GorgonException(GorgonResult result, string message, Exception inner)
Parameters
Type | Name | Description |
---|---|---|
GorgonResult | result | The result. |
string | message | Message data to append to the error. |
Exception | inner | The inner exception. |
GorgonException(SerializationInfo, StreamingContext)
Initializes a new instance of the GorgonException class with serialized data.
Declaration
protected GorgonException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | Serialization info. |
StreamingContext | context | Serialization context. |
GorgonException(string)
Initializes a new instance of the GorgonException class.
Declaration
public GorgonException(string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
string | errorMessage | Error message to display. |
GorgonException(string, Exception)
Initializes a new instance of the GorgonException class.
Declaration
public GorgonException(string errorMessage, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
string | errorMessage | Error message to display. |
Exception | innerException | Inner exception to pass through. |
Properties
| Edit this page View SourceResultCode
Property to return the exception result code.
Declaration
public GorgonResult ResultCode { get; }
Property Value
Type | Description |
---|---|
GorgonResult |
Methods
| Edit this page View SourceGetObjectData(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 |