Exceptions: Difference between revisions

note about qi change
(note about qi change)
Line 65: Line 65:
=== Special Case Error: XPCOM Infrastructure ===
=== Special Case Error: XPCOM Infrastructure ===


<code>QueryInterface</code> may be redesigned so that it never throws an exception. It will simply return a null pointer on failure, and callers must check for it if there is a possibility of failure. (Many <code>QueryInterface</code> calls are guaranteed to succeed.)
<code>QueryInterface</code> has been redesigned so that it never throws an exception. It returns a null pointer on failure, and callers must check for it if there is a possibility of failure. (Many <code>QueryInterface</code> calls are guaranteed to succeed.) (Note: the redesign hasn't been checked in to trunk yet.)


<code>GetService</code> may be handled the same way. (TBD)
<code>GetService</code> may be handled the same way. (TBD)


<code>CreateInstance</code> might also generate OOMs only, although other failure modes are possible. (TBD)
<code>CreateInstance</code> might also generate OOMs only, although other failure modes are possible. (TBD)


=== XPConnect ===
=== XPConnect ===
313

edits