I would like to invoke a method, using Java Reflection.
The problem is that this method (which I wrote) throws an Exception (I created a myCustomException).
One way to do it:
try { myMethod.invoke(null, myParam); } catch (InvocationTargetException e) { try { throw e.getCause(); } catch (MyCustomException e) { ...} catch (MyOtherException e) { ...} }