Ho to convert $error to `uvm_error using wrapper or define or something?

I have 100s of $error in my UVM testbench and I want to convert all of them into uvm_error so that i can control total number of errors using UVM_MAX_ERROR_COUNT knob. Is there any easy way to convert all the $errors into uvm_error using wrapper or define or something?

In reply to ravitejavoora:

The easiest thing to do is writing a script to replace all your $error calls to `uvm_error using your favorite scripting tool: sed/awk/perl/python