You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/04/10 12:33:30 UTC

svn commit: r1090763 - in /tomcat/trunk: java/org/apache/jasper/compiler/DefaultErrorHandler.java webapps/docs/changelog.xml

Author: markt
Date: Sun Apr 10 10:33:30 2011
New Revision: 1090763

URL: http://svn.apache.org/viewvc?rev=1090763&view=rev
Log:
Improve error reporting by labeling line/column numbers

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?rev=1090763&r1=1090762&r2=1090763&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java Sun Apr 10 10:33:30 2011
@@ -38,8 +38,8 @@ class DefaultErrorHandler implements Err
     @Override
     public void jspError(String fname, int line, int column, String errMsg,
             Exception ex) throws JasperException {
-        throw new JasperException(fname + "(" + line + "," + column + ")"
-                + " " + errMsg, ex);
+        throw new JasperException(fname + "(line: " + line + ", column: " +
+                column + ")" + " " + errMsg, ex);
     }
     
     /*

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1090763&r1=1090762&r2=1090763&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Apr 10 10:33:30 2011
@@ -57,9 +57,9 @@
         separated by commas. (kkolinko)
       </update>
       <add>
-        <bug>50306</bug>: New StuckThreadDetectionValve to detect requests that take a 
-        long time to process, which might indicate that their processing threads are 
-        stuck. Based on a patch provided by TomLu. (slaurent)
+        <bug>50306</bug>: New StuckThreadDetectionValve to detect requests that
+        take a long time to process, which might indicate that their processing
+        threads are stuck. Based on a patch provided by TomLu. (slaurent)
       </add>
     </changelog>
   </subsection>
@@ -71,6 +71,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <add>
+        Label JSP/tag file line and column numbers when reporting errors since
+        it may not be immediately obvious what the numbers represent. (markt)
+      </add>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <update>



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


Re: svn commit: r1090763 - in /tomcat/trunk: java/org/apache/jasper/compiler/DefaultErrorHandler.java webapps/docs/changelog.xml

Posted by Mark Thomas <ma...@apache.org>.
On 10/04/2011 16:06, Konstantin Kolinko wrote:
> 2011/4/10  <ma...@apache.org>:
>> Author: markt
>> Date: Sun Apr 10 10:33:30 2011
>> New Revision: 1090763
>>
>> URL: http://svn.apache.org/viewvc?rev=1090763&view=rev
>> Log:
>> Improve error reporting by labeling line/column numbers
> 
> This contradicts with i18n of errMsg.
> 
> If you are making this more human-readable, maybe add a whitespace
> before "(" in "(line"

Fixed. Thanks for the review.

Mark



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


Re: svn commit: r1090763 - in /tomcat/trunk: java/org/apache/jasper/compiler/DefaultErrorHandler.java webapps/docs/changelog.xml

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/10  <ma...@apache.org>:
> Author: markt
> Date: Sun Apr 10 10:33:30 2011
> New Revision: 1090763
>
> URL: http://svn.apache.org/viewvc?rev=1090763&view=rev
> Log:
> Improve error reporting by labeling line/column numbers

This contradicts with i18n of errMsg.

If you are making this more human-readable, maybe add a whitespace
before "(" in "(line"


>
> Modified:
>    tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
>    tomcat/trunk/webapps/docs/changelog.xml
>
> Modified: tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?rev=1090763&r1=1090762&r2=1090763&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java (original)
> +++ tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java Sun Apr 10 10:33:30 2011
> @@ -38,8 +38,8 @@ class DefaultErrorHandler implements Err
>     @Override
>     public void jspError(String fname, int line, int column, String errMsg,
>             Exception ex) throws JasperException {
> -        throw new JasperException(fname + "(" + line + "," + column + ")"
> -                + " " + errMsg, ex);
> +        throw new JasperException(fname + "(line: " + line + ", column: " +
> +                column + ")" + " " + errMsg, ex);
>     }
>
>     /*
>
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1090763&r1=1090762&r2=1090763&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Sun Apr 10 10:33:30 2011
> @@ -57,9 +57,9 @@
>         separated by commas. (kkolinko)
>       </update>
>       <add>
> -        <bug>50306</bug>: New StuckThreadDetectionValve to detect requests that take a
> -        long time to process, which might indicate that their processing threads are
> -        stuck. Based on a patch provided by TomLu. (slaurent)
> +        <bug>50306</bug>: New StuckThreadDetectionValve to detect requests that
> +        take a long time to process, which might indicate that their processing
> +        threads are stuck. Based on a patch provided by TomLu. (slaurent)
>       </add>
>     </changelog>
>   </subsection>
> @@ -71,6 +71,14 @@
>       </fix>
>     </changelog>
>   </subsection>
> +  <subsection name="Jasper">
> +    <changelog>
> +      <add>
> +        Label JSP/tag file line and column numbers when reporting errors since
> +        it may not be immediately obvious what the numbers represent. (markt)
> +      </add>
> +    </changelog>
> +  </subsection>
>   <subsection name="Web applications">
>     <changelog>
>       <update>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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