/** Returns true if any of the exceptions that caused this exception are of the specified type. */ public boolean causedBy (Class type) { return causedBy(this, type); }
/** Returns true if any of the exceptions that caused this exception are of the specified type. */ public boolean causedBy (Class type) { return causedBy(this, type); }
private boolean causedBy (Throwable ex, Class type) { Throwable cause = ex.getCause(); if (cause == null || cause == ex) return false; if (type.isAssignableFrom(cause.getClass())) return true; return causedBy(cause, type); }
private boolean causedBy (Throwable ex, Class type) { Throwable cause = ex.getCause(); if (cause == null || cause == ex) return false; if (type.isAssignableFrom(cause.getClass())) return true; return causedBy(cause, type); }
/** Returns true if any of the exceptions that caused this exception are of the specified type. */ public boolean causedBy (Class type) { return causedBy(this, type); }
private boolean causedBy (Throwable ex, Class type) { Throwable cause = ex.getCause(); if (cause == null || cause == ex) return false; if (type.isAssignableFrom(cause.getClass())) return true; return causedBy(cause, type); }