Detecting BPM Raise Exception

I’m working in the browser client environment. In Application Studio, what techniques are used to detect BPM Raise Exception event? actionResult is returned from the server but nothing stands out that I can use to take action. In the past I have used callContextBpmData but wondering if there is a better way.

Thanks

Are you trying to prevent the exception from giving you the slide out panel indicating there was an exception? Trying to understand your use case.

I think he wants to do something client side when there is an exception.

Yes, for example we need to prevent a user from entering qty in shipment that exceeds the sales order qty. We are using a pre or post-processing BPM to catch and signal back to the browser to clear the field or take other actions. Maybe there are other ways to accomplish this but we’re trying to minimize the browser side customization.

1 Like

Is the exception or an infomessage not enough?

1 Like

For the most part I think so but I don’t know how to catch that error in App Studio. This is what I get.

If I throw an error in my code with
throw new Exception(“BPM Exception Message.”);

In some cases I need more than just the error so I’m using BpmData to pass info back to the browser.

I hope this helps to explain. Again if there is a better way I’d love to learn.

Honestly I don’t know what’s all possible. Still trying to learn all the new stuff myself.

A lot of the controls and such have an On Error property that you could tee off of.

For known or expected errors, you could catch the exceptions server side and
return something in bpmdata, but then you’ll have to add checks in the event
stack to catch and act on.