debugging interfaces

Christian Plesner Hansen christian.plesner.hansen at
Thu Aug 13 12:55:14 PDT 2009

> Christian will correct me if I'm wrong, but I would assume the stack
> trace is captured at the point where Error.captureStackTrace is called,
> and so there is no requirement for the object to have been thrown.

Indeed.  Capturing stack traces on error instantiation rather than
throw has a number of nice properties: it avoids mutating the object
being thrown, it's a simple way for rethrown errors to retain a full
stack trace, and it avoids overhead on throwing.

More information about the es-discuss mailing list