How to make error flags of *E and *W become UVM_ERROR and UVM_WARNING?

Is there a way to make the error flags of *E and *W to become UVM_ERROR and UVM_WARNING, respectively?
*E and *W are being flagged whenever I’m having a randomization failure. My testcase is passing even though it sees these *E and *W because no UVM_ERROR and UVM_WARNING are reported.

I’m thinking to put an else statement together with the assert statement during randomization. And then I will put `uvm_error on that else statement.
However, this will take time because I used lots of assert statements when I do randomization.
So, is there a way to quickly flag a UVM_ERROR when it sees *E?

Thanks.

In reply to Reuben:

Could you please explain what is *E and *W?

In reply to chr_sue:
*E and *W are tool specific generated error and warning messages. Catching tool generated messages is going to be tool specific.

The problem here is the test writer was lazy and did not check the return status of a call to randomize. (Don’t ignore those warnings when you call a function with a return value as a statement instead of using it an expression). Same for $cast and using the action block of an assertion.

In reply to dave_59:

Actually I thought it would automatically flag TEST FAILED when *E is seen. In my previous compnay that’s what was happening. No need to put `uvm_error in the else statement and the test will automatically fail.

I think maybe the CAD engineers in my previous company did something on the script or something else. I don’t know. At first I thought it was a UVM setting. But as you mentioned, it is a tool specific.

Anyway, thanks for the help. I will try to ask Cadence about it. This setting can be useful to me or to the company in the future. Some engineers might accidentally forget checking the return value of functions. So it is good to have a check on these *E and *W.