On 2/8/14, 3:02 AM, Jakob Ovrum wrote:
On Saturday, 8 February 2014 at 00:49:46 UTC, Andrei Alexandrescu wrote:
One simple idea is to statically allocate the same exception and
rethrow it over and over. After all there's no guarantee a distinct
exception is thrown every time, and the approach is still memory safe
(though it might surprise the programmer who saves a reference to an
old exception).
Andrei
I don't think it's that simple. What happens if an XException causes
another XException and they need to be chained together?
The chaining method detects that and .dup's one of them.
Andrei