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
You can do as below:
catch (RemoteAccessException e) { int index = ExceptionUtils.indexOfThrowable(e, MyExcetption.class) if (index != -1) { //handleMyException } else { } }