View | Details | Raw Unified | Return to bug 61534
Collapse All | Expand All

(-)src/components/org/apache/jmeter/assertions/JSR223Assertion.java (-7 / +2 lines)
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();
(-)src/core/org/apache/jmeter/threads/JMeterThread.java (-2 / +5 lines)
Lines 811-818 Link Here
811
        AssertionResult assertionResult;
811
        AssertionResult assertionResult;
812
        try {
812
        try {
813
            assertionResult = assertion.getResult(result);
813
            assertionResult = assertion.getResult(result);
814
        } catch (ThreadDeath e) {
814
        } catch (AssertionError e) {
815
            throw e;
815
            log.debug("AssertionError processing Assertion.", e);
816
            assertionResult = new AssertionResult("Assertion failed! See log file.");
817
            assertionResult.setFailure(true);
818
            assertionResult.setFailureMessage(e.toString());
816
        } catch (JMeterError e) {
819
        } catch (JMeterError e) {
817
            log.error("Error processing Assertion.", e);
820
            log.error("Error processing Assertion.", e);
818
            assertionResult = new AssertionResult("Assertion failed! See log file.");
821
            assertionResult = new AssertionResult("Assertion failed! See log file.");

Return to bug 61534