In reply to shiva kumar:
How to do this is very specific to your design.
Generally, you use the factory to override your driver class with an error_driver class, and then override one of the driver's methods. Inside that method, you need to make a decision amour what and when to introduce an error.
class driver extends uvm_driver;
task run_phase(uvm_phase phase);
forever (@posedge vif.clk) begin
virtual task do_a();
class error_driver extends driver;
... // do some error