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 section called “Working with User Objects” in Users Guide. For information on using
try-catch blocks to catch runtime and user-defined exceptions, see the section called “Exception handling in
PowerBuilder” in Application Techniques and the the section called “TRY…CATCH…FINALLY…END TRY” in PowerScript Reference.
Properties
|
Error property |
Datatype |
Description |
|---|---|---|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Line |
Integer |
Identifies the line in the script at which the |
|
Number |
Integer |
Identifies the PowerBuilder error. |
|
Object |
String |
Contains the name of the object in which the error |
|
ObjectEvent |
String |
Contains the event in which the error |
|
String |
Contains the text of the error |
|
|
WindowMenu |
String |
Contains the name of the window or menu in which |
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 instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Boolean |
Adds an event to the end of the message queue of |
|
|
Integer |
Sends an event to the user object and executes the |
|
|
Object |
Returns the type of the user object. |