Occurs when an error is found in a data or property expression for an external object or a DataWindow object. Also occurs when a communications error is found in a client connecting to EAServer.
Improved error-handling capability The Error event is maintained for backward compatibility only. If you do not script the Error event or change its action argument, information from this event is passed to RuntimeError objects, such as DWRuntimeError. You can handle these errors in a try-catch block.
Event ID |
Objects |
---|---|
None |
Connection, DataWindow, DataStore |
Argument |
Description |
---|---|
errornumber |
Unsigned integer by value (PocketBuilder’s error number) |
errortext |
String, read-only (PocketBuilder’s error message) |
errorwindowmenu |
String, read-only (the name of the window or menu that is the parent of the object whose script caused the error) |
errorobject |
String, read-only (the name of the object whose script caused the error) |
errorscript |
String, read-only (the full text of the script in which the error occurred) |
errorline |
Unsigned integer by value (the line in the script where the error occurred) |
action |
ExceptionAction by reference. A value you specify to control the application’s course of action as a result of the error. Values are:
|
returnvalue |
Any by reference (a value whose datatype matches the expected value that the OLE server or DataWindow would have returned). This value is used when the value of action is ExceptionSubstituteReturnValue!. |
None. Do not use a RETURN statement.
This example displays information about the error that occurred and allows the script to continue:
MessageBox("Error Number " + string(errornumber)& + " Occurred", "Errortext: " + String(errortext)) action = ExceptionIgnore!
DBError in the DataWindow Reference or the online Help