Web 1 error messages

I’m managing a 3rd party’s code and we are frequently seeing the gray popup message showing errors. It’s covered by a dialog that is open in the app so I can’t read it.

Is there a way to suppress these or catch them somehow?

This dialog is the result of not handling a RuntimeException or a JavaScript error. You can suppress the dialog and use your own just like you would with the Desktop framework, by returning True in the UnhandledException event or JavaScriptError event.

Slight difference to the Desktop framework, there is an UnhandledException event on both the App object an the Session object. This allows you to finely tune your general exception recovery. Returning True in either event suppresses the user-facing error dialog.

1 Like

As always, thank you TIm.

Well it’s still happening.

from time to time I’m seeing:

Could not execute returned javascript: Cannot read properties of undefined (reading ‘setSize’)

Source: Xojo.controls[‘qIVLLqwV’].setSize(183,70);


I have added the exception handlers to App and the Session.

Does this trigger anything anyone can suggest for me to overcome this?

Okay, here is a wild wild guess: You are (well - you may be) setting the size of some control whose parenting window has already closed. Sometimes those javascript chunks arrive at a different order at the server than Xojo expected at the time. So, when you set a control’s size (or any property for that matter) check if its parenting window are still around. Closed windows are still in memory though so set some flag in the windows close event (or where ever you call close) and check for that when you set the size of the control. Btw, I’ve had success asking support@xojo.com for assistance with weird Web 1.0 errors so that might be worthwhile as well.