BoundaryErrorChecker does not parse class with (multiple) throw new BPMNError(String errorCode, String errorMessage) correctly.
DaZang opened this issue · comments
Problem
- BoundaryErrorChecker only finds the first occurance of throw new BPMNError
- BoundaryErrorChecker does not parse occurances of BPMNError with an error message correctly.
Example for 1 and 2:
public void execute(DelegateExecution execution) throws Exception { if (false) { throw new BpmnError("preceding_error_code", "error message"); } else { throw new BpmnError("123", "error message"); } }
Solution
- add a loop when searching for occurances of BPMNError
- parse second parameter of throw new BPMNError(String errorCode, String errorMessage) as well.
I'll open a pull request with a proposed fix.
Thanks for your contribution 👍