ICEfaces
  1. ICEfaces
  2. ICE-1679

ParserUtils.java is hiding a useful error message contained within the SAXException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#5
    • Fix Version/s: 1.6.2, 1.7DR#1, 1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP / Tomcat 5.5.17

      Description

      Recommend changing line 107 from this:
                          (Localizer.getMessage("jsp.error.parse.xml", uri), sx);

      To this:
                          (Localizer.getMessage("jsp.error.parse.xml", uri) + " - SAXException: " + sx.getMessage(), sx);

      Because when a ParseException occurs within the ParserUtils.parseXMLDocument() method, the sx.getMessage() can be very helpful in understanding what caused the exception to be thrown. As the code stands now, the message is ignored.


      Neil

        Activity

        Neil Griffin created issue -
        Hide
        Neil Griffin added a comment -

        This issue is related to this one:
        http://jira.icefaces.org/browse/ICE-1681

        In that if the scenario described in ICE-1681 occurs, then this issue becomes relevant.

        Show
        Neil Griffin added a comment - This issue is related to this one: http://jira.icefaces.org/browse/ICE-1681 In that if the scenario described in ICE-1681 occurs, then this issue becomes relevant.
        Hide
        Neil Griffin added a comment -

        Also recommend that you log an error to the console, like this:

        if (log.isErrorEnabled())

        { log.error(sx.getMessage()); }

        Because I think all the other "catch" blocks never bother to report this error.

        Show
        Neil Griffin added a comment - Also recommend that you log an error to the console, like this: if (log.isErrorEnabled()) { log.error(sx.getMessage()); } Because I think all the other "catch" blocks never bother to report this error.
        Hide
        Neil Griffin added a comment -

        OK, sorry, here it is altogether (including the URI, which would also be EXTREMELY helpful):

        if (log.isErrorEnabled())

        { log.error(sx.getMessage() + " - URI=" + uri); }

        throw new JasperException
        (Localizer.getMessage("jsp.error.parse.xml", uri) + " - SAXException: " + sx.getMessage() + " - URI: " + uri, sx);

        Show
        Neil Griffin added a comment - OK, sorry, here it is altogether (including the URI, which would also be EXTREMELY helpful): if (log.isErrorEnabled()) { log.error(sx.getMessage() + " - URI=" + uri); } throw new JasperException (Localizer.getMessage("jsp.error.parse.xml", uri) + " - SAXException: " + sx.getMessage() + " - URI: " + uri, sx);
        Ken Fyten made changes -
        Field Original Value New Value
        Fix Version/s 1.7DR#1 [ 10100 ]
        Assignee Ted Goddard [ ted.goddard ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14828 Wed Sep 19 11:59:57 MDT 2007 ted.goddard logging SAXException (ICE-1679)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/jasper/xmlparser/ParserUtils.java
        Hide
        Ted Goddard added a comment -

        Code change accepted with minor revisions. Thanks for the bug fix, Neil.

        Show
        Ted Goddard added a comment - Code change accepted with minor revisions. Thanks for the bug fix, Neil.
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.6.2 [ 10111 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14981 Thu Oct 18 16:36:12 MDT 2007 ted.goddard logging SAXException (ICE-1679)
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/core/src/com/icesoft/jasper/xmlparser/ParserUtils.java
        Hide
        Ted Goddard added a comment -

        Backported to icefaces-1.6 branch.

        Show
        Ted Goddard added a comment - Backported to icefaces-1.6 branch.
        Ted Goddard made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Ted Goddard [ ted.goddard ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: