2012-10-12 13 views

Respuesta

13

La traza completa está allí, pero es una repetición de la excepción anidada anterior que es la razón por la que se resume.

public class Main { 
    public static void throwsException() { 
     throw new UnsupportedOperationException(); 
    } 

    public static void main(String... args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { 
     Main.class.getMethod("throwsException").invoke(null); 
    } 
} 

grabados

Exception in thread "main" java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:601) 
    at Main.main(Main.java:27) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:601) 
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) 
Caused by: java.lang.UnsupportedOperationException 
    at Main.throwsException(Main.java:23) 
    ... 10 more 

El ... 10 more significa que es una repetición de la traza de la pila de la excepción que lo envuelve.

Cuestiones relacionadas