Exception handling in PowerBuilder – PB Docs 2022

Exception handling in
PowerBuilder

When a runtime error occurs in a PowerBuilder application, unless
that error is trapped, a single application event (SystemError) fires to
handle the error no matter where in the application the error happened.
Although some errors can be handled in the system error event, catching
the error closer to its source increases the likelihood of recovery from
the error condition.

You can use exception-handling classes and syntax to handle
context-sensitive errors in PowerBuilder applications. This means that you
can deal with errors close to their source by embedding error-handling
code anywhere in your application. Well-designed exception-handling code
can give application users a better chance to recover from error
conditions and run the application without interruption.

Exception handling allows you to design an application that can
recover from exceptional conditions and continue execution. Any exceptions
that you do not catch are handled by the runtime system and can result in
the termination of the application.

Exception handling can be found in such object-oriented languages as
Java and C++. The implementation for PowerBuilder is similar to the
implementation of exception handling in Java. In PowerBuilder, the TRY,
CATCH, FINALLY, THROW, and THROWS reserved words are used for exception
handling. There are also several PowerBuilder objects that descend from
the Throwable object.


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