Closed Bug 374852 Opened 17 years ago Closed 9 years ago

better exceptions in pyxpcom

Categories

(Other Applications Graveyard :: PyXPCOM, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: shanec, Unassigned)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: 

pyxpcom exceptions do not pass xpcom boundaries, and there is no way to get the message from COMException in JavaScript.  

This patch makes COMException a nsIException, and uses nsIStackFrame to provide deeper details in the exception.  This allows the exception to be handled in JavaScript.

It also catches exceptions (eg. javascript component called from pyxpcom component) and patches them up a bit by adding the pyxpcom layer to the "inner" member.  That way, if the exception is ultimately caught in javascript, you can still see where in python the exception occurred.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Attachment #259265 - Flags: review?(mhammond)
Attached patch exceptions.patchSplinter Review
this patch is not for general use, it has some debug statements I have added to help figure out an issue I am reviewing with MarkH
cleaned up patch.  PyErr_Clear is not necessary to call if we return NULL to python.  Returning NULL allows the exception object created in python to get passed through properly.
Blocks: 450553
Component: XPCOM → PyXPCOM
Product: Core → Other Applications
QA Contact: xpcom → pyxpcom
Version: Trunk → unspecified
Comment on attachment 259265 [details] [diff] [review]
pyxpcom_xpcom_exceptions.patch

Almost certainly out of date - sorry about that
Attachment #259265 - Flags: review?(mhammond)
Expired.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: