Commons Digester
  1. Commons Digester
  2. DIGESTER-62

InvocationTargetExceptions could be unwrapped

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      InvocationTargetExceptions may be thrown by all the bean utils method
      invocations used in Digester. These are logged and rethrown as SAXExceptions
      as is.

      I believe it would be easier to debug if these were unwrapped and the original
      exception (the target exception) is logged and wrapped in a SAXException.

      This is possibly easier to implement in the Digester class itself on the
      Exceptions thrown from Rules, rather than in each rule. I am happy to write a
      patch along these lines.

      What do you think?

      cheers,
      k@rl

        Activity

        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Affects Version/s 1.3 Final [ 12311822 ]
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Digester [ 12310471 ]
        Affects Version/s 1.3 Final [ 12311662 ]
        Key COM-259 DIGESTER-62
        Component/s Digester [ 12311111 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 14415 12340410
        Hide
        Craig McClanahan added a comment -

        Good idea – fixed in nightly build 20021216 of commons-digester. Note that we
        can only do the unwrapping when the InvocationTargetException actually wrapped
        an Exception (versus a Throwable), due to the fact that the SAXException
        constructors take Exception and not Throwable for the exception they wrap.

        Show
        Craig McClanahan added a comment - Good idea – fixed in nightly build 20021216 of commons-digester. Note that we can only do the unwrapping when the InvocationTargetException actually wrapped an Exception (versus a Throwable), due to the fact that the SAXException constructors take Exception and not Throwable for the exception they wrap.
        Karl von Randow created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Karl von Randow
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development