Plugin.OnException
method · Plugin · cAlgo.API
DesktopCLICloud
Called on each unhandled exception.
Environment behaviour
CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.
Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.
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):
# Place your exception handling code here
api.Print(exception.Message)