/** True if the given exception is skippable in any of the supplied contexts. */ public static boolean isSkippableInContext(Throwable e, Object... contexts) { if (!(e instanceof CanSkipInContext)) return false; for (Object c: contexts) { if (((CanSkipInContext)e).canSkipInContext(c)) { return true; } } return false; }