Controlling verbosity when using a demoter

Hello,

In a particular test, I need to demote a fatal error to a normal info.

Whilst I manage to demote the uvm_fatal to a uvm_info,
I don’t seem to be able to control the verbosity of the resulting `uvm_info
which gets printed out no matter what the uvm verbosity is set to from the command line :(



class demoter extends uvm_report_catcher;
   bit err_demoted;
   
  `uvm_object_utils(demoter)
   
   function action_e catch();
   
      if ((get_severity() == UVM_FATAL) && (get_id() == "invalid bla bla bla")) begin
         set_severity(UVM_INFO);
         set_verbosity(UVM_DEBUG);
         err_demoted = 1;
      end
      return THROW;
   
   endfunction : catch

endclass : demoter


In reply to emanuel:

See uvm_report_catcher unable to set_verbosity | Verification Academy