thekid/rfc — Issue #205: RFC 0205: All exceptions can be chained optionally
Author: thekid
Created: 2011-10-09 16:12:59+00:00
State: open
Labels: rfc

Scope of Change
====
Existing functionality of the lang.ChainedException will be moved into
the XP framework's base exception class lang.Throwable. As result, all
exceptions can have an optional causing exception attached to them.

Rationale
====
Only when every exception can have a causing exception attached to it,
one can easily make use of it in all circumstances. By now, when such
funcionality is required, the exception class in question must be modified
to inherit lang.ChainedException. Most of the time, it cannot be fore-
seen whether this is required or not at the time of writing the
exception class.

Functionality
====
* Move code from lang.ChainedException into lang.Throwable
* Make lang.ChainedException be empty
* Deprecate lang.ChainedException for XP 5.9

Security considerations
====
n/a

Speed impact
====
A new member "cause" will be added to lang.Throwable, so this will consume
more memory, and thus be slower. The impact is expected to be negligible,
though.

Dependencies
====
n/a

Related documents
====
http://xp-framework.net/rfc/contrib/rfc0205.diff
Implementing patch

Comments
====