Java 8 UndeclaredThrowableException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 UndeclaredThrowableException class.

This code example shows how to use the following methods: getUndeclaredThrowable
	public void run() { 
		try { 
			this.delegate.run();
		} 
		catch (UndeclaredThrowableException ex) {
			this.errorHandler.handleError(ex.getUndeclaredThrowable());
		} 
		catch (Throwable ex) {
			this.errorHandler.handleError(ex);
		} 
	} 
 
	@Override 
	public String toString() {
		return "DelegatingErrorHandlingRunnable for " + this.delegate;
	} 
 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
         } 
      } 
      if (t instanceof Error) {
         throw (Error) t;
      } 
      throw new UndeclaredThrowableException(t);
   } 
 
   protected SOAPFaultException findSoapFaultException(Throwable ex) {
        if (ex instanceof SOAPFaultException) {
            return (SOAPFaultException)ex;
        } 
        if (ex.getCause() != null) {
            return findSoapFaultException(ex.getCause());
        } 
        return null; 
    } 
 
   /** 
    * Compares two methods if they are identical. 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
		} 
		catch (InvocationTargetException ex) {
			ReflectionUtils.rethrowRuntimeException(ex.getTargetException());
		} 
		catch (IllegalAccessException ex) {
			throw new UndeclaredThrowableException(ex);
		} 
	} 
 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
    if (se.getCause() instanceof RemoteException) {
      return ((RemoteException) se.getCause()).unwrapRemoteException();
    } else if (se.getCause() instanceof IOException) {
      return (IOException)se.getCause();
    } else { 
      throw new UndeclaredThrowableException(se.getCause());
    } 
  } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCause, getUndeclaredThrowable
 
    /** 
     * java.lang.reflect.UndeclaredThrowableException#UndeclaredThrowableException(java.lang.Throwable) 
     */ 
    public void test_Constructor_Throwable() throws Exception {
        UndeclaredThrowableException e = new UndeclaredThrowableException(
                throwable);
        assertEquals("Wrong cause returned", throwable, e.getCause());
        assertEquals("Wrong throwable returned", throwable, e
                .getUndeclaredThrowable());
    } 
 
    /** 
     * java.lang.reflect.UndeclaredThrowableException#UndeclaredThrowableException(java.lang.Throwable, java.lang.String) 
     */ 
    public void test_Constructor_Throwable_String() throws Exception {
       UndeclaredThrowableException e = new UndeclaredThrowableException(
                throwable, msg);
        assertEquals("Wrong cause returned", throwable, e.getCause());
        assertEquals("Wrong throwable returned", throwable, e
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 UndeclaredThrowableException Methods: