| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ErrorClass > ErrorClass Methods >====== SetId (make a specific error current) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[sethistoryviewlevel set error history viewing mode .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setkey set the substitution value of the key macro .htm|{{btn_next_n.gif|Next page}}]] | | || **SetId(**// error id //**), PROTECTED** {{blk2blue.jpg|blk2blue.jpg}} | **SetId** | Makes the specified error the current one. | | //error id// | An integer constant, variable, EQUATE, or expression that indicates which error definition is current. | The **SetId **method makes the specified error the current one for processing by other ErrorClass methods. If more than one error definition matches the specified //error id//, the last defined error is used. This lets errors defined later override earlier defined errors with the same ID, while preserving the earlier defined errors for substitution into the %Previous macro symbol. This method is PROTECTED, therefore, it can only be called from an ErrorClass method, or a method in a class derived from ErrorClass. **Implementation:** The ABERROR.INC file contains a list of default EQUATEs for the //error id //parameter. **Example:** **ErrorClass.TakeError PROCEDURE(SHORT Id)** **  CODE** ** SELF.SetId(Id)** ** CASE SELF.Errors.Fatality** ** OF Level:Benign** **  RETURN SELF.TakeBenign()** ** OF Level:User** ** OROF Level:Cancel** **  RETURN SELF.TakeUser()** ** OF Level:Program** **  RETURN SELF.TakeProgram()** ** OF Level:Fatal** **  RETURN SELF.TakeFatal()** ** OF Level:Notify** **  SELF.TakeNotify()** **  RETURN Level:Notify** ** ELSE** **  RETURN SELF.TakeOther()** ** END** **See Also:**     [[errors recognized error definitions .htm|Errors]]