Lines 46-57
Link Here
|
46 |
Bindings bindings = scriptEngine.createBindings(); |
46 |
Bindings bindings = scriptEngine.createBindings(); |
47 |
bindings.put("SampleResult", response); |
47 |
bindings.put("SampleResult", response); |
48 |
bindings.put("AssertionResult", result); |
48 |
bindings.put("AssertionResult", result); |
49 |
try { |
49 |
processFileOrScript(scriptEngine, bindings); |
50 |
processFileOrScript(scriptEngine, bindings); |
|
|
51 |
} catch (AssertionError ae) { // NOSONAR We don't want to log the exception as it is handled |
52 |
result.setFailure(true); |
53 |
result.setFailureMessage(ae.toString()); |
54 |
} |
55 |
result.setError(false); |
50 |
result.setError(false); |
56 |
} catch (IOException | ScriptException e) { |
51 |
} catch (IOException | ScriptException e) { |
57 |
log.error("Problem in JSR223 script: {}", getName(), e); |
52 |
log.error("Problem in JSR223 script: {}", getName(), e); |
Lines 60-66
Link Here
|
60 |
} |
55 |
} |
61 |
return result; |
56 |
return result; |
62 |
} |
57 |
} |
63 |
|
58 |
|
64 |
@Override |
59 |
@Override |
65 |
public Object clone() { |
60 |
public Object clone() { |
66 |
return super.clone(); |
61 |
return super.clone(); |