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.koli...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to