Crashed OnTick

Created at 29 Aug 2013, 10:12
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!
ST

stoko

Joined 05.07.2013

Crashed OnTick
29 Aug 2013, 10:12


What does this mean:

Crashed in OnTick with WebException: The remote server returned an error: (414) Request-URI Too Large.

 

My bot crashed and triggered OnStop event because of the message above. It did not trigger OnError event!

What caused that error? OnTick I have a little call to a method that connects to my MSSQL database and I use the returned result to decide what the bot should do. Just before that message TCP connection to the DB was lost. Maybe that's what caused the 414 error.

Is there a way to handle this type of crash and restart the robot?

thanks!


@stoko
Replies

cAlgo_Fanatic
29 Aug 2013, 10:34

You can use a try...catch block to catch the exception.


@cAlgo_Fanatic

stoko
29 Aug 2013, 18:53

RE:

cAlgo_Fanatic said:

You can use a try...catch block to catch the exception.

of course!!! thank you!! was sleeping...


@stoko