I am currently using the play2 framework.
I have several classes which are throwing exceptions but play2s global onError handler uses throwable
exceptions
onError
You can use instanceof to check it is of NoSessionException or not.
instanceof
NoSessionException
Example:
if (exp instanceof NoSessionException) { ... }
Assuming exp is the Throwable reference.
exp
Throwable