I want to catch an exception, that is nested into another exception. I\'m doing it currently this way:
} catch (RemoteAccessException e) { if (e != null
I doubt, but you can check with instanceof if the exception is of the correct type.
instanceof
Edit: There should be a reason that the nested exception is wrapped, so you have to ask yourself what is the purpose of catching the nested one.