You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2009/05/24 12:07:57 UTC

DO NOT REPLY [Bug 47257] The class RhinoClassShutter disables instantiation of org.mozilla.javascript.EcmaError preventing handling of certain Javascript errors

https://issues.apache.org/bugzilla/show_bug.cgi?id=47257


Helder Magalhães <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |minor




--- Comment #1 from Helder Magalhães <he...@gmail.com>  2009-05-24 03:07:54 PST ---
(In reply to comment #0)
> I have a block of Javascript code that does something like:
> 
> try {
>   //reference some undeclared variable
> } catch (e) {}
> 
> This causes Rhino to generate an EcmaError, which it then tries to wrap in a
> Java object. However the RhinoClassShutter prevents accessing all rhino classes
> (for good reason) including the EcmaError class, thereby negating the
> usefulness of try/catch. 

I'm sure this makes sense and, although I haven't tried to reproduce, Batik
recently (see revision 701300 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=701300 ) for example) had a few improvements which may
help (compatibility with 1.6R7). Unfortunately, I'm fairly convinced they don't
address this specific issue...


> The only work around (other than making sure the Javascript never generates an
> EcmaError) seems to be to replace RhinoInterpreterFactory with your own, just
> to override the RhinoClassShutter, which has some more quirks if you are using
> the batik jars (which also install the RhinoInterpreterFactory). 

If you are aware of this workaround, why not sharing the solution proposal?
Patches are always welcome... ;-)


Also, I've decrease importance ("critical" was just too much, specially
considering a workaround [1] was already proposed).


Hope this helps,
 Helder


[1] https://issues.apache.org/bugzilla/page.cgi?id=fields.html#importance

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org