Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Handling XML exceptions with the Python API

533313Sep 22 2006 — edited Sep 25 2006
Can anyone tell me how to detect and handle DbXML exceptions in Python? The XmlException class is not available in Python, and symbols like DOCUMENT_NOT_FOUND are not defined either.

The most that I have managed to figure out is that a Python exception RuntimeError is thrown (which I can catch in a except clause). I can then get a string using sys.exc_info() (such as "Error: Document not found: blah.xml"). Is there a more reasonable way of catching and handling DbXML errors than by parsing the text of the error message?

Thanks,
Peter.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2006
Added on Sep 22 2006
2 comments
1,081 views