Author: kkolinko
Date: Tue Apr 9 16:35:03 2013
New Revision: 1466106
URL: http://svn.apache.org/r1466106
Log:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=54802
Provide location information for exceptions thrown by JspDocumentParser
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1466106&r1=1466105&r2=1466106&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java Tue Apr
9 16:35:03 2013
@@ -140,6 +140,23 @@ public class ErrorDispatcher {
* resource bundle for localized error messages, it is used as the error
* message.
*
+ * @param where Error location
+ * @param errCode Error code
+ * @param args Arguments for parametric replacement
+ * @param e Parsing exception
+ */
+ public void jspError(Mark where, Exception e, String errCode, String...
args)
+ throws JasperException {
+ dispatch(where, errCode, args, e);
+ }
+
+ /*
+ * Dispatches the given JSP parse error to the configured error handler.
+ *
+ * The given error code is localized. If it is not found in the
+ * resource bundle for localized error messages, it is used as the error
+ * message.
+ *
* @param n Node that caused the error
* @param errCode Error code
* @param args Arguments for parametric replacement
Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1466106&r1=1466105&r2=1466106&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Tue Apr
9 16:35:03 2013
@@ -205,9 +205,9 @@ class JspDocumentParser
jspDocParser.err.jspError
(new Mark(jspDocParser.ctxt, path, e.getLineNumber(),
e.getColumnNumber()),
- e.getMessage());
+ e, e.getMessage());
} catch (Exception e) {
- jspDocParser.err.jspError(e);
+ jspDocParser.err.jspError(e, "jsp.error.data.file.processing",
path);
}
return pageNodes;
Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1466106&r1=1466105&r2=1466106&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Tue
Apr 9 16:35:03 2013
@@ -344,6 +344,7 @@ jsp.error.function.classnotfound=The cla
jsp.error.signature.classnotfound=The class {0} specified in the method
signature in TLD for the function {1} cannot be found. {2}
jsp.error.text.has_subelement=<jsp:text> must not have any subelements
jsp.error.data.file.read=Error reading file \"{0}\"
+jsp.error.data.file.processing=Error processing file \"{0}\"
jsp.error.prefix.refined=Attempt to redefine the prefix {0} to {1}, when it
was already defined as {2} in the current scope.
jsp.error.nested_jsproot=Nested <jsp:root>
jsp.error.unbalanced.endtag=The end tag \"</{0}\" is unbalanced
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]