Closed
Bug 519935
Opened 15 years ago
Closed 6 years ago
Add option to prevent host exceptions to be catch by JS catch block
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: mguillemot, Unassigned)
Details
Attachments
(1 file)
8.05 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14
Build Identifier:
For tools like HtmlUnit, the host objects are an implementation detail and they should never throw anything else than a RhinoException. When something else is thrown like a NullPointerException, this means that an internal error occurred. Such an exception should not be catch by a JS catch statement to allow to quickly "see" that something goes wrong. Rhino offers such a possibility (with option) only for Error but it would require a lot of boilerplate code to wrap all host objects' code in a try/catch block to wrap exceptions in Errors (AOP could probably help here).
Attached patch adds a new Context option (feature) that allows to tell Rhino, not to catch host object exceptions.
Reproducible: Always
Comment 2•6 years ago
|
||
Closing. Bug management is now done here:
https://github.com/mozilla/rhino
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•