NestedException patch (Re: Embed E in Java)
Kevin Reid <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Jan 12, 2010, at 21:55, Kevin Reid wrote: > Here's my draft patch for this. Please review. > > It makes the following changes: > > * NestedException and NestedIOException now use the Throwable cause > field to store the provided exception. (The constructor parameter > order is backwards from the Java conventional one, but I decided not > to make the effort to change that.) > > * Deleted NestedError, as that class was not used. > > * Renamed Nested* to EBacktrace*, reflecting the primary use of > these classes since 'nesting' is now in general possible with plain > Java throwables. (I'm not sure this is a good idea.) > > * Enabled getCause() and initCause(throwable) in Throwable.safej. (I > also noticed that printStackTrace() is enabled, but should not be, > as it carries authority to stderr; I intend to fix this as a > separate commit.) > > <nested-exception-renamed-and-uses-cause-20090112.patch> MarkM requested that I revise this patch to stick to the 80-column limit (actually, 79, because that's what the header dots indicate). I have done so, except for two cases: one is the backtrace outputs mentioned in nested-throwable.updoc (as in the existing patch), and the other is in elib/base/Ejection.java (which was >79 *before* I changed anything, and I don't see how to rewrap it sensibly). I don't know what to do with either. Comments? -- Kevin Reid <http://switchb.org/kpreid/>