Mozilla 2/Exceptions: Difference between revisions

Line 10: Line 10:


= Overview and Motivations =
= Overview and Motivations =
''Describe the goals and objectives of the feature here.''
 
The goal is to replace all <code>nsresult</code>-based error reporting and handling with C++ exceptions.
 
The main benefit is that error-handing code will become simpler and more concise, making it easier to read and hack on Mozilla code. For example, <code>NS_ENSURE_RESULT</code> lines will disappear. Secondary benefits include:
 
* Obviating [https://bugzilla.mozilla.org/show_bug.cgi?id=353144#c70 bug 353144], which is that <code>new</code> is already throwing exceptions, which are not being handled properly.
 
* Enabling [[outparamdel]].
 
* Making it possible to propagate the same exception through both native code from C++ and JS runtimes, including Tamarin.
 
* Possibly improving performance on the common case of no errors.


= Risks and Assumptions =
= Risks and Assumptions =
313

edits