Handling PBDOM exceptions – PB Docs 125

Handling PBDOM exceptions

PBDOM defines an exception class, PBDOM_EXCEPTION,
derived from the standard PowerBuilder Exception class. The standard
Text property of the Exception class can be used to obtain more
detail on the nature of the exception being thrown. The class extends
the PowerBuilder Exception class with one method, GetExceptionCode, that
returns the unique code that identifies the exception being thrown.

For a list of exception codes, see the PowerBuilder
Extension Reference
or the topic PBDOM exceptions in
the online Help.

PBDOM is a PowerBuilder extension, built using PBNI. The extension
itself might throw a PBXRuntimeError exception. In the following
example, the try–catch block checks first for a PBDOM exception,
then for a PBXRuntimeError.

The example builds a PBDOM_DOCUMENT from a passed-in
file name and uses a user-defined function called ProcessData to
handle the DOM nodes. ProcessData could be a
recursive function that extracts information from the DOM elements
for further processing:


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