skip to content
Clarion Community Help
User Tools
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
throw_pass_an_error_to_the_error_handler_for_processing_.htm
| **Navigation:** [[abc library reference.htm|ABC Library Reference]] > FileManager > FileManager Methods >====== Throw (pass an error to the error handler for processing) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[setusemrp set usemrp value fm.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[throwmessage pass an error and text to the error handler .htm|{{btn_next_n.gif|Next page}}]] | | || **Throw( **[//error id//]// //**), VIRTUAL, PROC** {{blk2blue.jpg|blk2blue.jpg}} | **Throw** | Passes the specified error to the error handler object for processing. | | //error id// | A numeric constant, variable, EQUATE, or expression that indicates the error to process. If omitted, Throw processes the current error--that is , the error identified by the previous call to SetError or Throw. | The **Throw **method passes the current (last encountered) error to the nominated error handler for processing, including FILEERROR() and FILEERRORCODE() values, then returns the severity level of the error. **Implementation:** The SetError method saves the specified error and underlying error state for use by the Throw method. See //Error Class// for more information on error ids and severity levels. The Init method receives and sets the error handler object. **Return Data Type:** BYTE **Example:** **Access:Client.Next FUNCTION(BYTE HandleError)!Next function** ** CODE !with alternative error handling** ** LOOP** ** NEXT( SELF.File ) !get the next record** ** CASE ERRORCOD() !check for error conditions** ** OF BadRecErr OROF NoError** ** RETURN Level:Benign** ** OF IsHeldErr !if record is HELD by another** ** SELF.SetError(Msg:RecordHeld) !make RecordHeld the current error** ** IF HandleError !if interactive error handling** ** RETURN SELF.Throw() !pass current error to error handler** ** ELSE !otherwise (silent error handling)** ** RETURN Level:Notify !return error code to caller** ** END** ** END** ** END** **See Also: **[[init initialize the filemanager object .htm|Init]], [[seterror save the specified error and underlying error state .htm|SetError]]
throw_pass_an_error_to_the_error_handler_for_processing_.htm.txt
· Last modified: 2021/04/15 15:57 by
127.0.0.1
Page Tools
Show page
Old revisions
Backlinks
Back to top