Handling UnhandledExceptions

Well, I have yet to code UnhandledException handlers in my Web app, so I imagine it’s about time I do that in App and Session. After reading stuff on this in the docs and some on this forum, I have a question.

I see the following example code in the docs online for App.UnhandledException:

If error <> Nil Then Dim type As String = Introspection.GetType(error).Name MsgBox(type + EndOfLine + EndOfLine + Join(error.Stack, EndOfLine)) End If

Obviously that will issue a MsgBox for the user to see the error message. Will the error also get dumped into errors.log (alongside the Web app) by default, in virtue of my having that handler active? Or do I have to code a file write to get that?

I also understand it’s suggested I Return True to keep the app from quitting.

It will only get written to the log if you don’t return True. Returning True means that you have handled the exception and that the app shouldn’t crash.

Thanks as usual, Greg.

I’ve gotta say I love the oxymoronic title of this thread. :slight_smile: