Lean  $LEAN_TAG$
QuantConnect.Exceptions.StackExceptionInterpreter Class Reference

Interprets exceptions using the configured interpretations More...

Inheritance diagram for QuantConnect.Exceptions.StackExceptionInterpreter:
[legend]

Public Member Functions

 StackExceptionInterpreter (IEnumerable< IExceptionInterpreter > interpreters)
 Initializes a new instance of the StackExceptionInterpreter class More...
 
bool CanInterpret (Exception exception)
 Determines if this interpreter should be applied to the specified exception. More...
 
Exception Interpret (Exception exception, IExceptionInterpreter innerInterpreter=null)
 Interprets the specified exception into a new exception More...
 
string GetExceptionMessageHeader (Exception exception)
 Combines the exception messages from this exception and all inner exceptions. More...
 

Static Public Member Functions

static StackExceptionInterpreter CreateFromAssemblies (IEnumerable< Assembly > assemblies)
 Creates a new StackExceptionInterpreter by loading implementations with default constructors from the specified assemblies More...
 

Public Attributes

int Order => 0
 Determines the order that an instance of this class should be called More...
 
IEnumerable< IExceptionInterpreterInterpreters => _interpreters
 Gets the interpreters loaded into this instance More...
 

Static Public Attributes

static readonly Lazy< StackExceptionInterpreterInstance
 Stack interpreter instance More...
 

Additional Inherited Members

- Properties inherited from QuantConnect.Exceptions.IExceptionInterpreter
int Order [get]
 Determines the order that a class that implements this interface should be called More...
 

Detailed Description

Interprets exceptions using the configured interpretations

Definition at line 27 of file StackExceptionInterpreter.cs.

Constructor & Destructor Documentation

◆ StackExceptionInterpreter()

QuantConnect.Exceptions.StackExceptionInterpreter.StackExceptionInterpreter ( IEnumerable< IExceptionInterpreter interpreters)

Initializes a new instance of the StackExceptionInterpreter class

Parameters
interpretersThe interpreters to use

Definition at line 46 of file StackExceptionInterpreter.cs.

Here is the caller graph for this function:

Member Function Documentation

◆ CanInterpret()

bool QuantConnect.Exceptions.StackExceptionInterpreter.CanInterpret ( Exception  exception)

Determines if this interpreter should be applied to the specified exception.

Parameters
exceptionThe exception to check
Returns
True if the exception can be interpreted, false otherwise

Implements QuantConnect.Exceptions.IExceptionInterpreter.

Definition at line 61 of file StackExceptionInterpreter.cs.

◆ Interpret()

Exception QuantConnect.Exceptions.StackExceptionInterpreter.Interpret ( Exception  exception,
IExceptionInterpreter  innerInterpreter = null 
)

Interprets the specified exception into a new exception

Parameters
exceptionThe exception to be interpreted
innerInterpreterAn interpreter that should be applied to the inner exception. This provides a link back allowing the inner exceptions to be interpreted using the intepretators configured in the StackExceptionInterpreter. Individual implementations may ignore this value if required.
Returns
The interpreted exception

Implements QuantConnect.Exceptions.IExceptionInterpreter.

Definition at line 75 of file StackExceptionInterpreter.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetExceptionMessageHeader()

string QuantConnect.Exceptions.StackExceptionInterpreter.GetExceptionMessageHeader ( Exception  exception)

Combines the exception messages from this exception and all inner exceptions.

Parameters
exceptionThe exception to create a collated message from
Returns
The collate exception message

Definition at line 106 of file StackExceptionInterpreter.cs.

◆ CreateFromAssemblies()

static StackExceptionInterpreter QuantConnect.Exceptions.StackExceptionInterpreter.CreateFromAssemblies ( IEnumerable< Assembly >  assemblies)
static

Creates a new StackExceptionInterpreter by loading implementations with default constructors from the specified assemblies

Parameters
assembliesThe assemblies to scan
Returns
A new StackExceptionInterpreter containing interpreters from the specified assemblies

Definition at line 116 of file StackExceptionInterpreter.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Instance

readonly Lazy<StackExceptionInterpreter> QuantConnect.Exceptions.StackExceptionInterpreter.Instance
static
Initial value:
= new Lazy<StackExceptionInterpreter>(
() => StackExceptionInterpreter.CreateFromAssemblies(AppDomain.CurrentDomain.GetAssemblies()))

Stack interpreter instance

Definition at line 34 of file StackExceptionInterpreter.cs.

◆ Order

int QuantConnect.Exceptions.StackExceptionInterpreter.Order => 0

Determines the order that an instance of this class should be called

Definition at line 40 of file StackExceptionInterpreter.cs.

◆ Interpreters

IEnumerable<IExceptionInterpreter> QuantConnect.Exceptions.StackExceptionInterpreter.Interpreters => _interpreters

Gets the interpreters loaded into this instance

Definition at line 54 of file StackExceptionInterpreter.cs.


The documentation for this class was generated from the following file: