I am running a WiseJ app in VS 2017 in debug mode.
I have the default.json’s debug=true
But when I get an error while in VS’s debug mode, I get the Application Error box (see attachment) instead of the normal way that VS handles errors in their UI with the line of code being highlighted and the VS error dialog.
Can you tell me what I did wrong for this to happen?
Thanks,
Shawn
ok, thank you for our explanation and patience.
Shawn
Wisej handles all exceptions by default to send the error box to the client. Like ASP.NET. You don’t want the server to stop working because of an unhandled exception. That’s why when debug=true it also sends the stack trace. If you want VS to break you need to enabled it in the Exception Settings.
I’m sorry, I think I was using the wrong terminology, thank you for explaining it a bit.
I am not handling Application.ThreadException in this application.
I was talking about an unhandled user code exception. I am expecting VS to break at that bad line of code, but it isn’t, the WiseJ dialog box is popping up.
Did I do something to make that happen? I would rather VS break at the unhandled exception.
Thank you again,
Shawn
VS does’t handle exceptions. It breaks at the line that causes exceptions unhanded by user code. If you want VS to break on handled exceptions you have to enabled it using Debug->Windows->Exception Settings. Otherwise all exceptions are always handled by Wisej to return it to the client as an error message (unless you handle it in your code or in Application.ThreadException).
When debug=true Wisej will add the stack trace to the error box, otherwise it shows only the exception message.
Please login first to submit.