Have a look at Conditional Brekapoints
For the condition we would recommend to react on the specific Exception type