This can be demonstrated by inserting the following code snippet into an Optimizer:
if (State == State.Configure)
{
Print("This statement prints.");
throw new Exception("This exception prevents the following statement from executing.");
Print("This statement does not print.");
}
The first Print() statement reaches the Output window, but nothing else.
If the above code is added to a Strategy, the behavior is different. The first Print() statement is followed by a line describing the exception: it includes the Strategy name, method within which the exception occured and the text of the exception. This is much better than the behavior in the Optimizer.
I have two requests:
Apply whatever was done to make the Strategy report exceptions to the Optimizer and any other user programmable components have the same problem as the Optimizer.
Send a MessageBox so we don't have to constantly watch the Output window to determine whether an exception has occured.
Thanks
Comment