A DESCRIPTION OF THE REQUEST :
Since Java 1.4, java.lang.Exception have 2 new constructors:
public Exception(Throwable cause)
public Exception(String message, Throwable cause)
java.io.IOException (and subclasses) lacks those new constructors, thus preventing "usefull" subclassing.
JUSTIFICATION :
Catching nested exceptions are a usefull way to convey information in case of error. All exception (and error) classes from the JRE should include all 4 constructors.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the following constructors to be available:
public IOException()
public IOException(String s)
public IOException(Throwable cause)
public IOException(String message, Throwable cause)
ACTUAL -
The only available constructors are:
public IOException()
public IOException(String s)
CUSTOMER SUBMITTED WORKAROUND :
no workaround
Since Java 1.4, java.lang.Exception have 2 new constructors:
public Exception(Throwable cause)
public Exception(String message, Throwable cause)
java.io.IOException (and subclasses) lacks those new constructors, thus preventing "usefull" subclassing.
JUSTIFICATION :
Catching nested exceptions are a usefull way to convey information in case of error. All exception (and error) classes from the JRE should include all 4 constructors.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the following constructors to be available:
public IOException()
public IOException(String s)
public IOException(Throwable cause)
public IOException(String message, Throwable cause)
ACTUAL -
The only available constructors are:
public IOException()
public IOException(String s)
CUSTOMER SUBMITTED WORKAROUND :
no workaround
- duplicates
-
JDK-5070673 IOException should support exception chaining
-
- Resolved
-
- relates to
-
JDK-5070673 IOException should support exception chaining
-
- Resolved
-