How to stop the simulation only when specific errors occur

In reply to chr_sue:

In reply to saritr:
With UVM_MAX_QUIT_COUNT=1 you are advicing the simulator to stop after the first error. You see it works perfectly. If you want the simulator to tolerate some errors you have to set UVM_MAX_QUIT_COUNT to any value different from 1. In my projects I use a value between 10 and 30.

How can I manage the simulator to tolerate some errors?