You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2010/11/13 10:53:19 UTC

svn commit: r1034713 - /click/trunk/click/framework/src/org/apache/click/Context.java

Author: sabob
Date: Sat Nov 13 09:53:19 2010
New Revision: 1034713

URL: http://svn.apache.org/viewvc?rev=1034713&view=rev
Log:
improved exception msg

Modified:
    click/trunk/click/framework/src/org/apache/click/Context.java

Modified: click/trunk/click/framework/src/org/apache/click/Context.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/Context.java?rev=1034713&r1=1034712&r2=1034713&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/Context.java (original)
+++ click/trunk/click/framework/src/org/apache/click/Context.java Sat Nov 13 09:53:19 2010
@@ -349,6 +349,12 @@ public class Context {
      * @return true if the request contains the named parameter
      */
     public boolean hasRequestParameter(String name) {
+        if (name == null) {
+            throw new IllegalArgumentException("hasRequestParameter was called"
+                + " with null name argument. This is often caused when a"
+                + " Control binds to a request parameter, but its name was not"
+                + " set.");
+        }
         return (getRequestParameter(name) != null);
     }