Exception Handling
\The Sandbox \PB History & Future \New In PB8 \Exception Handling
Workspaces
Code Examples
UI changes
Working with 
PB8
Starting PB
System Tree
Library painter
Clip & Output
Source editor
AutoScript
Source Control
Exception
Handling
Web Targets
4GL Web
Pages
Web DW
Scripting
Web DW
Container
Web DW
Events
Server-side
Methods
JavaScript
Includes
HTML
Rendering
EAServer
Profiles
EAS/Existing
Interfaces
EJB Clients
EAS
Transactions
SSL
Connections
Concurrency
Property
Multiple
PB VMs
DB Interfaces
ANSI
Outer Join
Proxy
Connections
Loading
DB Libs
PB.INI/DB Info
Command Line
Deployment
Version
for EXEs
Color Support
New Object
Properties
DW
Expressions
DW
Properties
PowerScript
Functions
SaveObject
OLE Event
DBCS Support
GUIDs & MIMEs

Description

Before PowerBuilder 8, when a runtime or system error occurred in a PowerBuilder application, a single application event was fired to handle the error no matter where in the application the error happened.

Exception-handling classes and syntax are now available for context-sensitive error handling in PowerBuilder applications. This means that you can deal with errors closer to their source by embedding error-handling code anywhere in your application instead of in a single global error event. Well-designed exception-handling code can give application users a better chance to recover from error conditions and run the application without interruption.

Usage

With the addition of exception handling, PowerBuilder clients are able to catch exceptions thrown from EAServer components and recover from them. Components developed with PowerBuilder can also define and throw their own exception types, making them more consistent with other EAServer component types like Java.

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.

Backward compatibility The Error event and the ExternalException event are maintained for backward compatibility. However, if you script these events, you will not be able to take advantage of the new exception handling features of PowerBuilder.

The behavior after the SystemError event has been triggered has also changed. In previous releases, if you coded the SystemError event to enable the application to continue, control returned to the script in which the runtime error was triggered. In this release, the event that triggered the runtime error is terminated and the call stack is unwound.

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com