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

Could exceptions have information in them please?

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.3
    • core-libs
    • None
    • x86
    • windows_nt



      Name: rm29839 Date: 10/09/97


      Right now the exceptions basically have
      no (zero) information in them other
      than their type e.g. ClassCastException
      is just a humble class. OutOfMemoryError
      has a similar problem.

      This typically leads to serveral debugging
      passes just to figure out exactly what
      happened when in theory it seems reasonable
      for the classes to tell more.

      ClassCastException could also provide 2 class
      refs - the class we tried to cast to and the
      class we had.

      OutOfMemory could tell the amount of memory
      avail at that instant and the amount of
      spaced wanted.

      IndexOutOfBoundsException could provide
      the object indexed, the size, and the
      bad index that was tried.

      etc/etc/etc.

      I don't think there's much extra cost to this
      kind of stuff and the advantage is that it
      can [a] make the exceptions seem more valuable
      and complete and [b] cut down on a pass or two.

      Thanks for listening...


      company - Lumos , email - ###@###.###
      ======================================================================

            apalanissunw Anand Palaniswamy (Inactive)
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: