| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > FileManager > FileManager Methods >====== GetError (return the current error ID) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[geteof return end of file status .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getfield return a reference to a key component .htm|{{btn_next_n.gif|Next page}}]] | | || **GetError** {{blk2blue.jpg|blk2blue.jpg}} The **GetError **method returns the current error ID for the managed file. See //Error Class //for more information on error IDs. **Return Data Type:**     SIGNED **Example:** ** PROGRAM** ** INCLUDE('ABFILE.INC')                     !declare FileManager class** ** MAP                                       !program map** **LogError   (STRING filename, SHORT error)  !prototype LogError procedure** ** END** **GlobalErrors ErrorClass                    !declare GlobalErrors object** **Access:Client CLASS(FileManager)           !derive Access:Client object** **              END** **ErrorLog  FILE,DRIVER('TopSpeed'),PRE(LOG),CREATE,THREAD!declare log file** **Record     RECORD** **Date        LONG** **Time        LONG** **File        STRING(20)** **ErrorId     SHORT** **           END** **          END** ** CODE** ** !program code** ** IF Access:Client.Open()           !if error occurs** **  LogError(Access:Client.GetName(),Access:Client.GetError())!log name and error id** ** END** ** !program code** **LogError PROCEDURE(STRING filename, SHORT error)** ** CODE** ** LOG:Date   = TODAY()              !store date** ** LOG:Time   = CLOCK()              !store time** ** LOG:File   = filename             !store filename** ** LOG:ErrorId = error               !store error id** ** ADD(ErrorLog)                     !write logfile**