Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4398872

Throwable needs getWrappedException() method

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • 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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: