Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

PopulateError – PB Docs 2018 – PowerBuilder Library

PopulateError – PB Docs 2018

PopulateError

PowerScript function

Description

Fills in the Error object without causing a SystemError
event.

Syntax

Argument

Description

number

The integer to be stored in the number property of
the Error object

text

The string to be stored in text property of the Error
object

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. The
return value is usually not used.

Usage

If the values you want to populate the Error object with depend on
the current value of a variable in your script, you can use
PopulateError to assign values to the number and text fields in the Error
object (the remaining fields of the Error object will be populated
automatically, including the line number of the error). Then you can call
SignalError without arguments to trigger a SystemError. You will need to
include code in the SystemError event script to recognize and handle the
error you have created. If there is no script for the SystemError event,
the SignalError function does nothing.

Examples

The gf_DoSomething function takes a table name and a record and
returns 0 for success and a negative number for an error. The following
statements set the number and text values in the Error object according to
a script variable, then trigger a SystemError event once the processing is
complete:

See also

SignalError


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x