How to exit from simulation on getting UVM_ERROR

In reply to Aurelian_from_AMIQ:

Hi Aurelian,

+uvm_set_action does exit simulation if UVM_EXIT is used but UVM_ERROR does not get print in logfile. Is there any way to get UVM_ERROR in logfile before simulation is exited?
I have used `uvm_error in a module and not any uvm component.