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

Basics of exception handling – PB Docs 2018 – PowerBuilder Library

Basics of exception handling – PB Docs 2018

Basics of exception handling

Exceptions are objects that are thrown in the event of some
exceptional (or unexpected) condition or error and are used to describe
the condition or error encountered. Standard errors, such as null object
references and division by zero, are typically thrown by the runtime
system. These types of errors could occur anywhere in an application and
you can include catch clauses in any executable script to try to recover
from these errors.

User-defined exceptions

There are also exceptional conditions that do not immediately
result in runtime errors. These exceptions typically occur during
execution of a function or a user-event script. To signal these
exceptions, you create user objects that inherit from the PowerScript
Exception class. You can associate a user-defined exception with a
function or user event in the prototype for the method.

For example, a user-defined exception might be created to indicate
that a file cannot be found. You could declare this exception in the
prototype for a function that is supposed to open the file. To catch
this condition, you must instantiate the user-defined exception object
and then throw the exception instance in the method script.


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