tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1464781 - /tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
Date Thu, 04 Apr 2013 23:00:54 GMT
Author: kkolinko
Date: Thu Apr  4 23:00:53 2013
New Revision: 1464781

URL: http://svn.apache.org/r1464781
Log:
Fix 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/JspDocumentParser.java

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=1464781&r1=1464780&r2=1464781&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Thu Apr  4 23:00:53
2013
@@ -1184,8 +1184,9 @@ class JspDocumentParser
         TagInfo tagInfo = tagLibInfo.getTag(localName);
         TagFileInfo tagFileInfo = tagLibInfo.getTagFile(localName);
         if (tagInfo == null && tagFileInfo == null) {
-            throw new SAXException(
-                Localizer.getMessage("jsp.error.xml.bad_tag", localName, uri));
+            throw new SAXParseException(
+                Localizer.getMessage("jsp.error.xml.bad_tag", localName, uri),
+                locator);
         }
         Class<?> tagHandlerClass = null;
         if (tagInfo != null) {
@@ -1194,11 +1195,11 @@ class JspDocumentParser
                 tagHandlerClass =
                     ctxt.getClassLoader().loadClass(handlerClassName);
             } catch (Exception e) {
-                throw new SAXException(
+                throw new SAXParseException(
                     Localizer.getMessage("jsp.error.loadclass.taghandler",
                                          handlerClassName,
                                          qName),
-                    e);
+                    locator, e);
             }
         }
 
@@ -1329,7 +1330,7 @@ class JspDocumentParser
                         Localizer.getMessage(
                             "jsp.error.parse.xml.scripting.invalid.body",
                             elemType);
-                    throw new SAXException(msg);
+                    throw new SAXParseException(msg, locator);
                 }
             }
         }
@@ -1357,7 +1358,7 @@ class JspDocumentParser
                 locator,
                 fnfe);
         } catch (Exception e) {
-            throw new SAXException(e);
+            throw new SAXParseException(e.getMessage(), locator, e);
         }
     }
 



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


Mime
View raw message