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

add constructor accepting a Throwable to IllegalArgumentException

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs
    • generic
    • generic



      Name: nt126004 Date: 12/06/2001


      java version "1.4.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
      Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)

      public void someMethod sampleMethod() {
      try {
      someOtherMethod();
      } catch (Throwable ex) {
      throw new IllegalArgumentException(ex);
      }

      }
      This does not compile because IllegalArgumentException class does not have
      constructor
      IllegalArgumentException(Throwable t) even thought it extends from
      RuntimeException which does
      (Review ID: 136600)
      ======================================================================

            jjb Josh Bloch
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: