Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 318D8F0F4 for ; Fri, 5 Apr 2013 15:11:21 +0000 (UTC) Received: (qmail 83130 invoked by uid 500); 5 Apr 2013 15:11:20 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 83072 invoked by uid 500); 5 Apr 2013 15:11:20 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 83062 invoked by uid 99); 5 Apr 2013 15:11:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 15:11:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 15:11:18 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 053E87794; Fri, 5 Apr 2013 15:10:57 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 54802] Provide location information for exceptions thrown by JspDocumentParser Date: Fri, 05 Apr 2013 15:10:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Jasper X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: knst.kolinko@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=54802 --- Comment #3 from Konstantin Kolinko --- Created attachment 30157 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30157&action=edit 2013-04-05_tc8_54802_1.patch A patch that improves information shown by error page and logged. > but at least it will provide the name of the file First, the above assumption is actually incorrect. A locator does not provide the file name. It knows line and column numbers only (and systemId, publicId of the resource). The name was provided by catch(SAXParseException) clause at JspDocumentParser.parse(JspDocumentParser.java:205) Still, I would say that line numbers are useful. Second, the original exception was lost in the same place (JspDocumentParser.java:205). It is easy to fix by adding a new method to jasper.compiler.DefaultErrorHandler. See the patch. Third, the logging is done in StandardWrapper.invoke(). It logged only the innermost exception in ex.getCause() chain. I am saying that it is wrong as 1. A usual rule is that outer exceptions provide additional contextual information. 2. The error page shows the full exception chain. Omitting it in the log message is inconsistent and leaves administrator without a clue. Though one of my assumptions was wrong, as I mention above, I plan to leave r1464781 as is and go on with changes outlined in this patch. -- 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