> 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. _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

