src/main/java/com/greghaskins/spectrum/internal/blocks/NotifyingBlock.java
/**
   * Add notification of exceptions to a throwing block.
   * @param description which test called the block
   * @param reporting object to inform of failure
   * @param block the block to execute
   * @throws Throwable the error which was reported to the {@link RunNotifier}
   */
Add notification of exceptions to a throwing block.
@param description which test called the block
@param reporting object to inform of failure
@param block the block to execute
@throws Throwable the error which was reported to the  RunNotifier
Add notification of exceptions to a throwing block . @param description which test called the block @param reporting object to inform of failure @param block the block to execute @throws Throwable the error which was reported to the RunNotifier
static void executeAndReport(final Description description,
      final RunReporting<Description, Failure> reporting,
      final Block block) throws Throwable {
    try {
      block.run();
    } catch (final AssumptionViolatedException assumptionViolation) {
      reporting.fireTestAssumptionFailed(new Failure(description, assumptionViolation));
      throw assumptionViolation;
    } catch (final Throwable throwable) {
      reporting.fireTestFailure(new Failure(description, throwable));
      throw throwable;
    }
  }
static void executeAndReport ( final Description description , final RunReporting < Description , Failure > reporting , final Block block ) throws Throwable { try { block . run ( ) ; } catch ( final AssumptionViolatedException assumptionViolation ) { reporting . fireTestAssumptionFailed ( new Failure ( description , assumptionViolation ) ) ; throw assumptionViolation ; } catch ( final Throwable throwable ) { reporting . fireTestFailure ( new Failure ( description , throwable ) ) ; throw throwable ; } }
Add notification of exceptions to a throwing block.
Add notification of exceptions to a throwing block .