App.UnhandledException question

  1. 3 months ago

    Ralph A

    Apr 23 Santa Monica, California
    Edited 3 months ago

    Running Xojo 2018r4.

    I tested a new bare Web project with App.Open having a single line of code:

    Raise New RuntimeException

    If I build that project with no App.UnhandledException event handler, and then run it on a server, it loads WebPage1 and no error file is produced.

    I then added the App.UnhandledException event handler with a single line of code:

    Return False

    Building that second project has the same results.

    I was doing this to see what the user would see during an App Runtime Exception. Shouldn't the the user see the default dialog that asks for input, with an errors.log file being created or appended?

  2. Jonathan E

    Apr 23 Pre-Release Testers, Xojo Pro Las Vegas, NV

    You might need to put your code for Raising the exception on the session, not the App. The App.Open event happens on the server not when the user connects.

  3. Ralph A

    Apr 23 Santa Monica, California

    @Jonathan E You might need to put your code for Raising the exception on the session, not the App. The App.Open event happens on the server not when the user connects.

    Hmmm...but that would only initiate the Session.UnhandledException event handler, not the App.UnhandledException event handler. I can understand why the user never gets the Standard Dialog in the examples I outlined, because at the point of the exception, their browser isn't connected. But why does the app continue to load? I thought the default behavior was to kill the app.

  4. Jonathan E

    Apr 23 Pre-Release Testers, Xojo Pro Las Vegas, NV

    @Ralph Alvy Hmmm...but that would only initiate the Session.UnhandledException event handler, not the App.UnhandledException event handler. I can understand why the user never gets the Standard Dialog in the examples I outlined, because at the point of the exception, their browser isn't connected. But why does the app continue to load? I thought the default behavior was to kill the app.

    That I couldn't tell you, I was pointing out that a user wouldn't have any indication of an app exception unless by "user" you mean a client that is launching the app.

  5. Ralph A

    Apr 23 Santa Monica, California

    Thanks, Jonathan. Maybe someone else will be able to tell me why the app continues to load in this situation.

or Sign Up to reply!