List of usage examples for java.lang.reflect Executable getExceptionTypes
public abstract Class<?>[] getExceptionTypes();
From source file:MyClass.java
public static ArrayList<String> getExceptionList(Executable exec) { ArrayList<String> exceptionList = new ArrayList<>(); for (Class<?> c : exec.getExceptionTypes()) { exceptionList.add(c.getSimpleName()); }/*from w w w .ja v a 2s.co m*/ return exceptionList; }