Error object
The Error object is used to record execution-time errors.
You can access the Error object from a script (typically in the
SystemError event) to learn which error occurred and where it occurred.
You can also customize your own version of the Error object by defining
a class user object inherited from the built-in Error object.
For more information about creating a custom
Error object, see the chapter on user objects in the PowerBuilder
Users Guide. For information on using try–catch
blocks to catch runtime and user-defined exceptions, see Application Techniques and
the PowerScript Reference.
Properties
Error property |
Datatype |
Description |
---|---|---|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
Line |
Integer |
Identifies the line in the script at |
Number |
Integer |
Identifies the PowerBuilder error. |
Object |
String |
Contains the name of the object in which |
ObjectEvent |
String |
Contains the event in which the error |
String |
Contains the text of the error message. |
|
WindowMenu |
String |
Contains the name of the window or menu |
Events
Error event |
Occurs |
---|---|
When the user object is created. |
|
When the user object is destroyed. |
Functions
Error function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the user |
|
Integer |
Creates a reference to a context-specific |
|
PowerObject |
Returns a reference to the name of the |
|
Boolean |
Adds an event to the end of the message |
|
Integer |
Sends an event to the user object and |
|
Object |
Returns the type of the user object. |