C# Class Aspectacular.ExceptionExtensions

Datei anzeigen Open project: vgribok/Aspectacular

Public Methods

Method Description
AllExceptions ( this ex ) : IEnumerable

Returns all exceptions in the chain starting from the innermost.

AllExceptionsBack ( this ex ) : IEnumerable

Returns all exceptions in the chain starting from the outermost.

Consolidate ( this ex, string separator, bool innerFirst, string>.Func converter ) : string

Joins text information from the chain of exceptions including inner ones.

ConsolidatedInfo ( this ex, string separator = null, bool innerFirst = true ) : string

Returns exception information (messages + stack traces) in the exception chain (main + inner exceptions), starting from the innermost one.

ConsolidatedMessage ( this ex, string separator = null, bool innerFirst = true ) : string

Returns all messages in the exception chain (main + inner exceptions), starting from the innermost one.

ConsolidatedStack ( this ex, string separator = null, bool innerFirst = true ) : string

Returns all stack traces in the exception chain (main + inner exceptions), starting from the innermost one.

FullInfo ( this ex ) : string

Returns string containing exception type, message and stack trace. No inner exception information included.

ToSerializable ( this ex ) : ExceptionDto

Returns Exception-like object that can serialized to XML, JSON, etc.

TypeAndMessage ( this ex ) : string

Returns string with the information of exception type and message.

Method Details

AllExceptions() public static method

Returns all exceptions in the chain starting from the innermost.
public static AllExceptions ( this ex ) : IEnumerable
ex this
return IEnumerable

AllExceptionsBack() public static method

Returns all exceptions in the chain starting from the outermost.
public static AllExceptionsBack ( this ex ) : IEnumerable
ex this
return IEnumerable

Consolidate() public static method

Joins text information from the chain of exceptions including inner ones.
public static Consolidate ( this ex, string separator, bool innerFirst, string>.Func converter ) : string
ex this
separator string
innerFirst bool True to put innermost exception on top, false for outermost.
converter string>.Func
return string

ConsolidatedInfo() public static method

Returns exception information (messages + stack traces) in the exception chain (main + inner exceptions), starting from the innermost one.
public static ConsolidatedInfo ( this ex, string separator = null, bool innerFirst = true ) : string
ex this
separator string
innerFirst bool True to put innermost exception on top, false for outermost.
return string

ConsolidatedMessage() public static method

Returns all messages in the exception chain (main + inner exceptions), starting from the innermost one.
public static ConsolidatedMessage ( this ex, string separator = null, bool innerFirst = true ) : string
ex this
separator string
innerFirst bool True to put innermost exception on top, false for outermost.
return string

ConsolidatedStack() public static method

Returns all stack traces in the exception chain (main + inner exceptions), starting from the innermost one.
public static ConsolidatedStack ( this ex, string separator = null, bool innerFirst = true ) : string
ex this
separator string
innerFirst bool True to put innermost exception on top, false for outermost.
return string

FullInfo() public static method

Returns string containing exception type, message and stack trace. No inner exception information included.
public static FullInfo ( this ex ) : string
ex this
return string

ToSerializable() public static method

Returns Exception-like object that can serialized to XML, JSON, etc.
public static ToSerializable ( this ex ) : ExceptionDto
ex this
return ExceptionDto

TypeAndMessage() public static method

Returns string with the information of exception type and message.
public static TypeAndMessage ( this ex ) : string
ex this
return string