Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-75

Don't wrap RuntimeExceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.0.0 [beta 2]
    • None
    • XNI
    • None
    • Operating System: Other
      Platform: Other
    • 5076

    Description

      org.apache.xerces.parsers.StandardParserConfiguration.parse (both methods) has
      the code

      catch (Exception ex)

      { if (PRINT_EXCEPTION_STACK_TRACE) ex.printStackTrace(); throw new XNIException(ex); }

      This is annoying and inconvenient. If my code has a bug and
      accordingly throws a RuntimeException, instead of getting a useful
      stack trace showing what the exception was and where it occurred, I
      get a useless stack trace saying an XNIException occurred in
      StandardParserConfiguration. I would suggest that RuntimeExceptions
      not be wrapped, i.e.

      catch (RuntimeException ex)

      { if (PRINT_EXCEPTION_STACK_TRACE) ex.printStackTrace(); throw ex; }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jjc@jclark.com James Clark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: