Exception triggered in the Application on Ready  doesn't trigger Global Exception
Application Type

Hello everyone,

In the application on ready event i have defined a piece of logic that checks a boolean client.variable which is only set during the login of the application, and only triggers the exception if the user is logged in. Ofcours this makes that by default the exception is never raised. After the user is logged in it checks the client variable on the next screen en navigates it to a different screen if set to false. However when i just change the URL and i am already logged in, it does not perform this check i want.

What i would like to achieve is the following:

- I would like to check if the client variable = true for every screen that i try to acces, by button or by changing the URL, without having to define a onready action for every screen.

- If the client variable is false it should navigate to a certain page

However when the exception is triggered it doesn't come up to the global exception handler, during the debugging session.

It just goes straight towards an error screen

Do you guys have any ideas on how to either trigger the global exception handler?

Or do you have any idea how to perform a check for every screen (check is identical) that is generally set up without having to define a event for every individual page?


Hi Jacob,

For performing this check no every screen and each request to the screen you can perform this check in OnReady action on any of the common block used on all you screens. There can be many common block like Menu, footer etc. and you can perform this check any of these block.

Try above and see if it reaches to the global exception because ideally it shouldn't show error screen if exceptions are handled properly. If you still get this error screen then share a minimal oml having this same issue so I can see and suggest better.

You solution is very clever! Thank you!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.