Do something after exception was thrown

Hi All,

Is there any way I can do something after exception thrown via frappe.throw ?
For example upon Budget breaches and the budget action is Stop, I would like to send notification to Budget Approver role’s users to notify them.

Tried to send notification but it got rolled-back when exception thrown.

Thanks.
Dey