Xbasic
ERROR_TEXT_GET Function
Syntax
Error_Text as C = ERROR_TEXT_GET([N error_code])
Arguments
- error_code
Optional. Default = The number of the most recent run-time error. The number of an error. Numeric
Description
Retreive the error text for an error code (last error code if ommitted).
Discussion
ERROR_TEXT_GET() returns the Error_Text message associated with a run-time Error_Number. If no Error_Number is supplied, the text of the most recent run-time error is returned. Error number 1000 indicates a DOS error. Use this error number to obtain the text of the most recent DOS error.
Example
Use this error handling routine to display the error message of any run-time error that occurs.
error_handler:
err_msg = error_text_get(error_code_get() )
ui_msg_box("Error", err_msg)
resume nextThis script lists all error messages for error codes 1000 to 1108.
for i = 1000 TO 1108
trace.writeln( str(i) + ":" + error_text_get(i) )
next iSee Also