| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ErrorClass > ErrorClass Methods >====== RemoveErrors (remove or restore recognized errors) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[removeerror remove an individual error .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[resethistory clear history structure .htm|{{btn_next_n.gif|Next page}}]] | | || **RemoveErrors(**// error block //**)** {{blk2blue.jpg|blk2blue.jpg}} | **RemoveErrors** | Removes the entries specified in the //error block// from the Errors property. | | //error block// | A GROUP whose first component field is a USHORT containing the number of error entries in the GROUP. Subsequent component fields define the error entries. | The **RemoveErrors **method receives error entries and deletes them from the existing Errors property. The Errors property may contain more than one error with the same ID. Errors added later override earlier added errors with the same IDs. If you remove an overriding error definition, the "overridden" error is fully restored. **Implementation:** RemoveErrors assumes the Errors property has already been created by Init or by some other method. Each// error block// entry consists of a USHORT containing the error ID, a BYTE containing the severity level, a PSTRING containing the title to display on the error message window, and another PSTRING containing the error message text. However, RemoveErrors only considers the error ID when removing errors. **Example:** **GlobalErrors ErrorClass                     !declare GlobalErrors object** **Payroll PROCEDURE** **PayErrors GROUP,STATIC** **Number     USHORT(2)                        !number of errors in the group** **           USHORT(Msg:RebuildKey)           !first error ID** **           BYTE(Level:Notify)               !severity level** **           PSTRING('Invalid Key')           !window title** **           PSTRING('%File key is invalid.') !message text** **           USHORT(Msg:RebuildFailed)        !second error ID** **           BYTE(Level:Fatal)                !severity level** **           PSTRING('Key was not built')     !window title** **           PSTRING('Repairing key for %File.')  !message text** **          END** ** CODE** ** GlobalErrors.AddErrors(PayErrors)          !add Payroll specific errors** ** !process payroll** ** GlobalErrors.RemoveErrors(PayErrors)       !remove Payroll specific errors** **See Also:**     [[adderrors add or override recognized errors .htm|AddErrors]], [[init initialize the errorclass object .htm|Init]], [[errors recognized error definitions .htm|Errors]]