Get details of thrown BPMN Error


I am throwing a BPMN Error from a delegate. While throwing that error, I am passing a descriptive message with the error code (as constructor allows to provide message along with error code). I have an event based sub-process to catch that error. This process is supposed to take the message from error and put it in a log file.

I am not sure about how to retrieve the message from the error in the sub-process. So I would like get some input on how to accomplish that.

Thanks in advance,
Aman Shrivastava

I have the same question, without answer also :slight_smile:
The only way I have found to have additional info about the error is to add variable(s) to the execution context before throwing the BPMNError, then to get them in the error flow.

execution.setVariable(“errorMessage”, myErrorMessage);

Has anybody another way to retrieve error message?