@ GwtIncompatible ( "incompatible method" ) public static boolean hasCause ( Throwable chain , final Class < ? extends Throwable > type ) { if ( chain instanceof UndeclaredThrowableException ) { chain = chain . getCause ( ) ; } return type . isInstance ( chain ) ; }
Does the throwable s causal chain have an immediate or wrapped exception of the given type?