/** * Creates a {@link ThreadSpawner} which can report exceptions to the {@link ExceptionReporter} or throw them directly. * * @param identifier identifier to give reported exceptions a context * @param throwException <code>true</code> if exceptions should be directly thrown, * <code>false</code> if {@link ExceptionReporter} should be used */ public ThreadSpawner(String identifier, boolean throwException) { this.identifier = identifier; this.throwException = throwException; this.exceptionHandler = initExceptionHandler(throwException); }
/** * Creates a {@link ThreadSpawner} which can report exceptions to the {@link ExceptionReporter} or throw them directly. * * @param testId testId to give reported exceptions a context * @param throwException <code>true</code> if exceptions should be directly thrown, * <code>false</code> if {@link ExceptionReporter} should be used */ public ThreadSpawner(String testId, boolean throwException) { this.testId = testId; this.throwException = throwException; this.exceptionHandler = initExceptionHandler(throwException); }