Hi,
Given some special circumstances I need to remove a repeated UVM_ERROR from the log entirely.
I’ve made 2 attempts so far.
So before removing it entirely, we already had code to demote it.
function uvm_report_catcher::action_e prj_report_catcher::catch();
string error_message, error_id, demoted_id;
error_message = get_message();
error_id = get_id();
demoted_id = {error_id, " *DEMOTED*"};
if(get_severity() == UVM_ERROR && (error_message == "I'm the error message that needs to be deleted") && (error_id == "I'm the error ID that needs to be deleted") ) begin
set_severity(UVM_INFO);
set_id(demoted_id);
return THROW;
end
return THROW; //returns to report catcher queue
endfunction : catch
my first attempt to remove it was to add to this code
set_verbosity(UVM_FULL)
while we were running on UVM_HIGH, thinking that it would lead to not printing it.
That did no work, so I figured that for demoted errors the verbosity is ignored.
So from the test I added this code:
set_report_severity_id_action_hier( UVM_INFO , "I'm the error ID that needs to be deleted *DEMOTED*", .action(0));
In your catch method you use this statement in any case. It indicates you are throwing it reports to the existing report catcher. You do not pass it to your specific report catcher.