In fact, in a normal situation there is always a logged in user - either a regular user (after login) or anonymous (before login or after logout). So all exception handlers work on the login screen too - just for the anonymous user.
I created a custom exception by extending the RunTimeException class in modules > global> src> com.company.i.project.
I also created a handler for this exception by extending the AbstractUiExceptionHandler class. This class is located in GenericUI > Screens> com.company.i.web. I insert its constructor and implement the protected void doHandle (String className, String message, @Nullable Throwable throwable, UiExceptionHandler.UiContext context) method.
In the login screen in the onBeforeShow event I insert the following line: throw new MyRunTimeException (“Error”). The handler I created in this specific case is not invoked in any way.
If the same line of code is inserted in the onBeforeShow of the Main screen, the handler works correctly.
Hi.
Could you please provide more information about your problem? Which version of the platform do you use?
I’ve tried to create my own ZeroBalanceException and a handler for it as it described here and throws it in the login screen in the onBeforeShow event. Everything works fine for me, I’m using platform 7.2.8.