Is it posible to have a custom null pointer exception message for a particular screen?
The error is valid but i want to make it a little more user understandable?
Regards,
LS.
Is it posible to have a custom null pointer exception message for a particular screen?
The error is valid but i want to make it a little more user understandable?
Regards,
LS.
Hello,
you can catch NPE and throw your exception or show the error notification:
@Subscribe
public void onInit(InitEvent event) {
    try {
        // code throws NPE
    } catch (NullPointerException e) {
        throw new MyScreenException("Error message");
        // or show the error notification
    }
}
public static class MyScreenException extends RuntimeException {
    public MyScreenException(String message) {
        super(message);
    }
}