Xbasic
ERROR_SCRIPT_GET Function
Syntax
Script_Name as C = ERROR_SCRIPT_GET([N SESSION])
Arguments
- SESSION
Numeric
Description
Report the script that the error occured in.
Discussion
ERROR_SCRIPT_GET() returns the Script_Name of the script in which the error occurred. You would generally use this command in the error handler portion of a script.
Example
Use this error handling routine to display the error message script name, and line number any run-time error that occurs.
error_handler:
err_msg = error_text_get(error_code_get() )
line = error_line_number_get()
script = error_script_get()
ui_msg_box("Error", err_msg + " Error occurred at line " + alltrim( str(line, 4, 0) ) + "in script: " + script)
resume nextSee Also