I am currently using the play2 framework.
I have several classes which are throwing exceptions but play2s global onError handler uses throwable instead of an exception.
for example one of my classes is throwing a NoSessionException. Can I check a throwable object if it is a NoSessionException ?
You can use
instanceofto check it is ofNoSessionExceptionor not.Example:
Assuming
expis theThrowablereference.