C# Class CK.Core.CKException

Inheritance: System.Exception
Mostra file Open project: Invenietis/ck-core Class Usage Examples

Public Methods

Method Description
CKException ( CKExceptionData data ) : System

Initializes a new CKException with an ExceptionData. The message of this exception is the CKExceptionData.Message. Use the static CreateFrom to handle null data (a null CKException will be returned).

CKException ( Exception innerException, string messageFormat ) : System

Initializes a new CKException with an Exception.InnerException.

CKException ( string message ) : System

Initializes a new CKException.

CKException ( string message, Exception innerException ) : System

Initializes a new CKException.

CreateFrom ( CKExceptionData data ) : CKException

Creates a CKException from a CKExceptionData. This method returns null when data is null. This is the symmetric of CKExceptionData.CreateFrom.

EnsureExceptionData ( ) : CKExceptionData

If ExceptionData is null, this method creates the CKExceptionData with the details from this exception.

Private Methods

Method Description
DoSerialize ( object sender, System.Runtime.Serialization.SafeSerializationEventArgs e ) : void

Method Details

CKException() public method

Initializes a new CKException with an ExceptionData. The message of this exception is the CKExceptionData.Message. Use the static CreateFrom to handle null data (a null CKException will be returned).
public CKException ( CKExceptionData data ) : System
data CKExceptionData The exception data. Must not be null.
return System

CKException() public method

Initializes a new CKException with an Exception.InnerException.
public CKException ( Exception innerException, string messageFormat ) : System
innerException System.Exception Exception that caused this one.
messageFormat string Format string with optional placeholders.
return System

CKException() public method

Initializes a new CKException.
public CKException ( string message ) : System
message string Simple message.
return System

CKException() public method

Initializes a new CKException.
public CKException ( string message, Exception innerException ) : System
message string Simple message.
innerException System.Exception Exception that caused this one.
return System

CreateFrom() static public method

Creates a CKException from a CKExceptionData. This method returns null when data is null. This is the symmetric of CKExceptionData.CreateFrom.
static public CreateFrom ( CKExceptionData data ) : CKException
data CKExceptionData Data of an exception for which a wrapper must be created. Can be null: null is returned.
return CKException

EnsureExceptionData() public method

If ExceptionData is null, this method creates the CKExceptionData with the details from this exception.
public EnsureExceptionData ( ) : CKExceptionData
return CKExceptionData