You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ra...@apache.org on 2005/08/27 04:19:47 UTC

svn commit: r240376 - /jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java

Author: rahul
Date: Fri Aug 26 19:19:45 2005
New Revision: 240376

URL: http://svn.apache.org/viewcvs?rev=240376&view=rev
Log:
We're not going anywhere, might as well curl up and die here, while we can produce a reasonable error message.

Modified:
    jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java?rev=240376&r1=240375&r2=240376&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java Fri Aug 26 19:19:45 2005
@@ -32,6 +32,10 @@
 
     /** Host JSP's VariableResolver. */
     private VariableResolver vr;
+    /** Bark if JSP Context is null */
+    private static final String ERR_HOST_JSP_CTX_NULL =
+        "Host JSP Context cannot be null";
+
     /**
      * Constructor.
      *
@@ -40,10 +44,12 @@
     public RootContext(final JspContext ctx) {
         super();
         if (ctx == null) {
-            LOG.error("Host JSP Context cannot be null");
+            LOG.error(ERR_HOST_JSP_CTX_NULL);
+            throw new IllegalArgumentException(ERR_HOST_JSP_CTX_NULL);
+        } else {
+          // only retain the VariableResolver
+          this.vr = ctx.getVariableResolver();
         }
-        // only retain the VariableResolver
-        this.vr = ctx.getVariableResolver();
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org