Consider exposing cause information for IOException

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      There are consumers of java.io.IOException that have reason to want to know the underlying condition which caused the exception. For example, see the JRuby code

          https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/Ruby.java#L3964...L3996

      One way to encode such information would be with subtypes of IOException. However, exception types should be declared sparingly (https://blogs.oracle.com/darcy/entry/design_tips_exception_types), so a "getProblem" method or similar might be a better approach. The problem could be an enum or a wrapper around errno.

      Design complications includes the many subtypes of IOException and serialization.

            Assignee:
            Unassigned
            Reporter:
            Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: