My log file has several lines that contain the following string (as an example):-
MY_ERROR
Please note that “MY_ERROR” is the output of legacy $display statements, that I cannot convert to UVM_ERROR.
Is there a way I can “catch” MY_ERROR and take further action?
The code shown below does not work.
Thank You!
function action_e catch;
uvm_severity severity = get_severity();
string id = get_id();
uvm_action action = get_action();
string message = get_message();
int verbosity = get_verbosity();
if (uvm_is_match({"*MY_ERROR*"},get_message())) begin
$display("Success!"); $finish;
end
return THROW;
endfunction