Plugin.OnError
method · Plugin · cAlgo.API
DesktopCLICloud
Called if there is an error executing a trade operation.
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 OnError(Error error)
api.OnError(error: Error) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
error | Error | Error | Error description. |
Examples
protected override void OnError(Error error)
{
Print("There has been an Error");
}
def on_error(self, error):
print("There has been an Error")