Skip to content

Algo.OnException

method · Algo · cAlgo.API.Internals

DesktopCLICloud

Called on each unhandled exception.

Definition

protected internal void OnException(Exception exception)
api.OnException(exception: Exception) -> None

Parameters

Name C# type Python type Description
exception Exception Exception

Examples

protected override void OnException(Exception exception)
{
    // Place your exception handling code here
    Print(exception.Message);
}
def on_exception(self, exception):
    api.Print(exception.Message)