cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r681703 - /cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
Date Fri, 01 Aug 2008 14:22:33 GMT
Author: gkossakowski
Date: Fri Aug  1 07:22:32 2008
New Revision: 681703

URL: http://svn.apache.org/viewvc?rev=681703&view=rev
Log:
Don't use deprecated JavaSriptException. It's enough to use RuntimeException as we are wrapping
it anyway.

Modified:
    cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java

Modified: cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java?rev=681703&r1=681702&r2=681703&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
(original)
+++ cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
Fri Aug  1 07:22:32 2008
@@ -302,7 +302,7 @@
             //java class (used by importClass & importPackage)
             if (this.locked && !has(name, start) && !(value instanceof NativeJavaClass)
&& !(value instanceof Function)) {
                 // Need to wrap into a runtime exception as Scriptable.put has no throws
clause...
-                throw new WrappedException (new JavaScriptException("Implicit declaration
of global variable '" + name +
+                throw new WrappedException (new RuntimeException("Implicit declaration of
global variable '" + name +
                   "' forbidden. Please ensure all variables are explicitely declared with
the 'var' keyword"));
             }
             this.useSession = true;
@@ -312,7 +312,7 @@
         public void put(int index, Scriptable start, Object value) {
             // FIXME(SW): do indexed properties have a meaning on the global scope?
             if (this.locked && !has(index, start)) {
-                throw new WrappedException(new JavaScriptException("Global scope locked.
Cannot set value for index " + index));
+                throw new WrappedException(new RuntimeException("Global scope locked. Cannot
set value for index " + index));
             }
             this.useSession = true;
             super.put(index, start, value);



Mime
View raw message