Closed Bug 340015 Opened 19 years ago Closed 3 years ago

Handle DOM exceptions in JavaXPCOM

Categories

(Core Graveyard :: Java to XPCOM Bridge, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jhpedemonte, Unassigned)

Details

Some DOM methods throw exceptions of type DOMException, LSException, XPathException, and RangeException; theoretically, also SVGException, although all instances of it are commented out. Currently in JavaXPCOM, if an XPCOM method called from Java returns an error, the JavaXPCOM code throws an instance of XPCOMException (which wraps the actual nsresult value, in case the Java developer needs that information). Here are my questions: (1) Should I even worry about this in JavaXPCOM, and just continue throwing XPCOMException for these methods? Is it worthwhile throwing these DOM exceptions? (2) If I do decide to throw DOM exceptions, what's the best way to do it? I haven't done a full search through the code, but I did find this: http://landfill.mozilla.org/mxr-test/mozilla/source/dom/src/base/nsDOMScriptObjectFactory.cpp#223. I figure I could use nsIInterfaceInfo to find if the method throws an exception, and if so, just call nsDOMScriptObjectFactory::GetException().
Assignee: jhpedemonte → nobody
Product: Core → Core Graveyard

JavaXPCOM was removed in bug 648593.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.