use of org.apache.jorphan.util.JMeterError in project jmeter by apache.
the class JMeterThread method processAssertion.
private void processAssertion(SampleResult result, Assertion assertion) {
AssertionResult assertionResult;
try {
assertionResult = assertion.getResult(result);
} catch (ThreadDeath e) {
throw e;
} catch (JMeterError e) {
log.error("Error processing Assertion.", e);
assertionResult = new AssertionResult("Assertion failed! See log file.");
assertionResult.setError(true);
assertionResult.setFailureMessage(e.toString());
} catch (Exception e) {
log.error("Exception processing Assertion.", e);
assertionResult = new AssertionResult("Assertion failed! See log file.");
assertionResult.setError(true);
assertionResult.setFailureMessage(e.toString());
}
result.setSuccessful(result.isSuccessful() && !(assertionResult.isError() || assertionResult.isFailure()));
result.addAssertionResult(assertionResult);
}
Aggregations