How to stop the simulation only when specific errors occur

In reply to yaswanth021:

The simulation stop also in case of error when I use +UVM_MAX_QUIT_COUNT.