tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54802] New: Provide location information for exceptions thrown by JspDocumentParser
Date Thu, 04 Apr 2013 22:41:48 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54802

            Bug ID: 54802
           Summary: Provide location information for exceptions thrown by
                    JspDocumentParser
           Product: Tomcat 7
           Version: 7.0.39
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: knst.kolinko@gmail.com
    Classification: Unclassified

Steps to reproduce - see bug 54801

It causes an exception to be thrown by
org.apache.jasper.compiler.JspDocumentParser.checkScriptingBody()

The issue is that the exception in bug 54801 does not provide any information
on the file where it occurred. It does not show in which tag file it happened,
and thus it is hard to follow.

There are four places in JspDocumentParser where it throws a "SAXException"
without any location information.  I propose to replace

  throw new SAXException(msg);

with

  throw new SAXParseException(msg, locator);

I am not sure that line numbers will be correct in all four cases, but at least
it will provide the name of the file. This is better than nothing.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message