Code example for InvocationTargetException

Methods: getCause

0
mWebSettings_setDatabaseEnabled.invoke(e);
		   } 
		   catch (InvocationTargetException ite) {
	           /* unpack original exception when possible */ 
	           Throwable cause = ite.getCause();
	           if (cause instanceof IOException) {
	               throw (IOException) cause;
	           } else if (cause instanceof RuntimeException) {
	               throw (RuntimeException) cause;
	           } else if (cause instanceof Error) {
	               throw (Error) cause;
	           } else { 
	               /* unexpected checked exception; wrap and re-throw */ 
	               throw new RuntimeException(ite);
	           } 
	       } catch (IllegalAccessException ie) {
	           System.err.println("unexpected " + ie);
	       }	    
	   }