Duplicate :
|
|
Relates :
|
|
Relates :
|
Name: rmT116609 Date: 07/01/2004 A DESCRIPTION OF THE REQUEST : Consider adding to IOException a constructor that supports exception chaining conveniently (IOException( String, Throwable)). JUSTIFICATION : IOException seems to be basic or common enough to warrant supporting exception chaining directly in the constructor. (In my case, I'm writing an OutputStream subclass that operates on an underlying stream. If a method on the underyling stream throws an exception, I wrap it in an IOException specific to the calling method in my OutputStream subclass. CUSTOMER SUBMITTED WORKAROUND : Instead of: throw new IOException( "higher-level message", e ); use IOException temp = IOException( "higher-level message" ); temp.initCause( e ); throw temp; (Incident Review ID: 282209) ======================================================================
|