Gorgon
Show / Hide Table of Contents

Class GorgonException

A custom exception that allows the passing of a GorgonResult code.

Inheritance
object
Exception
GorgonException
Implements
ISerializable
_Exception
Inherited Members
Exception.GetBaseException()
Exception.ToString()
Exception.GetType()
Exception.Message
Exception.Data
Exception.InnerException
Exception.TargetSite
Exception.StackTrace
Exception.HelpLink
Exception.Source
Exception.HResult
Exception.SerializeObjectState
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.MemberwiseClone()
Namespace: Gorgon.Core
Assembly: Gorgon.Core.dll
Syntax
[Serializable]
public class GorgonException : Exception, ISerializable, _Exception

Constructors

| Edit this page View Source

GorgonException()

Default constructor.

Declaration
public GorgonException()
| Edit this page View Source

GorgonException(GorgonResult)

Initializes a new instance of the GorgonException class.

Declaration
public GorgonException(GorgonResult result)
Parameters
Type Name Description
GorgonResult result

The result.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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 Source

ResultCode

Property to return the exception result code.

Declaration
public GorgonResult ResultCode { get; }
Property Value
Type Description
GorgonResult

Methods

| Edit this page View Source

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
Exception.GetObjectData(SerializationInfo, StreamingContext)
Exceptions
Type Condition
ArgumentNullException

The info parameter is a null reference (Nothing in Visual Basic).

Implements

ISerializable
_Exception

Extension Methods

GorgonExceptionExtensions.Catch<T>(T, Action<T>, IGorgonLog)
GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonExceptionExtensions.Repackage(Exception, GorgonResult)
GorgonExceptionExtensions.Repackage(Exception, GorgonResult, string)
GorgonExceptionExtensions.Repackage(Exception, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author