| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ErrorClass > ErrorClass Methods >====== TakeUser (process user error) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[takeprogram process program error .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[throw process specified error .htm|{{btn_next_n.gif|Next page}}]] | | || **TakeUser, PROTECTED, VIRTUAL, PROC** {{blk2blue.jpg|blk2blue.jpg}} The **TakeUser** method is called when an error with Level:User is "Thrown" to the ErrorClass (see Throw, ThrowFile, ThrowMessage). TakeUser must return a severity level to denote the user's response. **Implementation:** The base class method (ErrorClass.TakeUser) displays the error message and returns either Level:Benign or Level:Cancel depending on the end user's response. **Return Data Type:**     BYTE **Example:** **  INCLUDE('ABERROR.INC')            !declare ErrorClass** **MyErrorClass CLASS(ErrorClass)      !declare derived class** **TakeUser      FUNCTION,BYTE,VIRTUAL !prototype corresponding virtual** **             END** **GlobalErrors MyErrorClass           !declare GlobalErrors object** ** CODE** ** GlobalErrors.Init                  !GlobalErrors initialization** ** !program code** ** GlobalErrors.Throw(Msg:CreateFailed) !Throw method calls SELF.TakeUser to ** **                                   !automatically call the derived class method** **                                   !rather than the base class method** **  !program code** **MyErrorClass.TakeUser FUNCTION     !derived class virtual to handle user errors** ** CODE** **  !your custom code here** ** IF MESSAGE(SELF.SubsString(),SELF.GetErrorBufferTitle(),ICON:Question, |** **   Button:Yes+Button:No,BUTTON:Yes,0) = Button:Yes** **  !your custom code here** **  RETURN Level:Benign** ** ELSE** **  !your custom code here** **  RETURN Level:Cancel** ** END** **See Also:**     [[takeerror process specified error .htm|TakeError]], [[throw process specified error .htm|Throw]], [[throwfile set value of file then process error .htm|ThrowFile]], [[throwmessage set value of message then process error .htm|ThrowMessage]]