public static void suppressExceptions(RunnableWithException action) { try { action.run(); } catch (InterruptedException e) { // restore interrupted state Thread.currentThread().interrupt(); } catch (Throwable t) { if (isJvmFatalError(t)) { rethrow(t); } } }
/** * A wrapper function for running test. Deal with setup and teardown logic * in Context. * @param testMethod the real test body. */ void runTest(RunnableWithException testMethod) throws Exception { startResourceManager(); try { testMethod.run(); } finally { stopResourceManager(); } } }
public static void suppressExceptions(RunnableWithException action) { try { action.run(); } catch (InterruptedException e) { // restore interrupted state Thread.currentThread().interrupt(); } catch (Throwable t) { if (isJvmFatalError(t)) { rethrow(t); } } }
public static void suppressExceptions(RunnableWithException action) { try { action.run(); } catch (InterruptedException e) { // restore interrupted state Thread.currentThread().interrupt(); } catch (Throwable t) { if (isJvmFatalError(t)) { rethrow(t); } } }
(Object ignored, Throwable throwable) -> { try { runnable.run(); } catch (Throwable e) { throwable = ExceptionUtils.firstOrSuppressed(e, throwable);
(Object ignored, Throwable throwable) -> { try { runnable.run(); } catch (Throwable e) { throwable = ExceptionUtils.firstOrSuppressed(e, throwable);
(Object ignored, Throwable throwable) -> { try { runnable.run(); } catch (Throwable e) { throwable = ExceptionUtils.firstOrSuppressed(e, throwable);