Scripting the SystemError event
What you do
In the SystemError event of the Application object, you can
write a script to tell PowerBuilder to halt application execution
or ignore the error.
Example
In this example, the SystemError event script displays a message
informing the user of the condition that caused the communications
error and gives the user the opportunity to control what happens
next. Depending on the user’s input, the client application
halts execution or ignores the error and continues processing:
1 |
string ls_logline = "SYSTEM ERROR: "<br>ls_logline += String(error.number) + " " + error.text<br> |
1 |
ls_logline += " occurred at line " + &<br> String(error.line) + " "<br>ls_logline += " in event " + error.objectevent<br>ls_logline += " of object " + error.object<br> <br>if Messagebox("System Error", ls_logline + &<br> "~r~n~r~nDo you want to stop the program?", &<br> Question!, YesNo!) = 1 then<br> HALT CLOSE<br>end if |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest