How to demote UVM_ERROR to UVM_WARNING in a specific hierarchy

Hi Verification Academy ,

I want to demote all uvm error to uvm warning in on of my agent. I see example for disabling for specific Error Code - But i just want to disable it entirely for a specific hierarchy. What is the best approach for this ?

In reply to manikandansriram:

When I mean a component , For instance when I want to set to an agent ,I want all the uvm errors demoted into uvm warning in all its class members too like the driver,monitor,sequencer etc.

In reply to manikandansriram:

You can do this from the command line

<sim command> +uvm_set_severity=uvm_test_top.env0.*,ALL,UVM_ERROR,UVM_WARNING

Or you can use set_report_severity_id_verbosity_hier() from your test after the build_phase is complete.