[prev in list] [next in list] [prev in thread] [next in thread]
List: batik-dev
Subject: DO NOT REPLY [Bug 47257] New: The class RhinoClassShutter disables
From: bugzilla () apache ! org
Date: 2009-05-23 20:19:00
Message-ID: bug-47257-30099 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]
https://issues.apache.org/bugzilla/show_bug.cgi?id=47257
Summary: The class RhinoClassShutter disables instantiation of
org.mozilla.javascript.EcmaError preventing handling
of certain Javascript errors
Product: Batik
Version: 1.7
Platform: All
OS/Version: Mac OS X 10.4
Status: NEW
Severity: critical
Priority: P2
Component: Scripting
AssignedTo: batik-dev@xmlgraphics.apache.org
ReportedBy: vgoenka@apache.org
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.
Perhaps the RhinoClassShutter should allow exception/error classes to be
referenced/instantiated even if they are in the org.mozilla.javascript package.
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).
Access to Java class "org.mozilla.javascript.EcmaError" is prohibited. (Inline
<script> http://....:-1#4)
at
org.apache.batik.transcoder.SVGAbstractTranscoder$SVGAbstractTranscoderUserAgent.displayError(SVGAbstractTranscoder.java:863)
at
org.apache.batik.bridge.BaseScriptingEnvironment.handleInterpreterException(BaseScriptingEnvironment.java:694)
at
org.apache.batik.bridge.BaseScriptingEnvironment.loadScripts(BaseScriptingEnvironment.java:522)
at
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:214)
at
org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
at
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
at
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic