OnError in cbot does nothing

Created at 26 Oct 2016, 21:39
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ZZ

zzzz1

Joined 19.06.2015

OnError in cbot does nothing
26 Oct 2016, 21:39


I discovered that a bot can detect when Ctrader disconnects from the server. I used the same code that is provided in the documentation:

protected override void OnError(Error error)
{
    if (error.Code == ErrorCode.Disconnected)
    {
        Print("The server is disconnected.");
    }
}

I pull out my lan cable, I get that familiar sound Ctrader makes when it is disconnected from the server and ... I get nothing. The error does not get printed at all. I tried if it gives out any error at all:

protected override void OnError(Error error)
{
     Print("{0}", error.Code);
}

... and I get the same result.

Is this a bug? Please guys, help me out.


@zzzz1
Replies

... Deleted by UFO ...