Throwable needs getWrappedException() method

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.3.0
    • Component/s: core-libs
    • generic
    • generic



      Name: krC82822 Date: 12/16/2000


      It is common practice among Java developers to wrap exceptions. See the SAX
      API's SaxException for an example. If Throwable had a method
      getNextException() or getWrappedException() or maybe getWrappedThrowable(),
      it would make dealing with wrapped exceptions in a generic way very easy.

      The default implementation in Throwable would return null.
      So all we are asking for is three lines in java.lang.Throwable:

      public Throwable getWrappedThrowable(){
        return null;
      }


      (or getWrappedException() equivalent)


      (Review ID: 113916)
      ======================================================================

            Assignee:
            Josh Bloch (Inactive)
            Reporter:
            Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: