rethrowing exceptions

John Lenz concavelenz at gmail.com
Tue May 20 13:10:16 PDT 2014


Has there been any discussion about rethrowing exceptions such that they
retain the original context?

try {
  throws();
} catch (e) {
  if (e instanceof SomeError) {
    // handle it
  }
  rethrow e;
}

Or is this been out side the spec because stack traces in general are
outside the spec?

It isn't really clear if "throw e;" should have the original stack trace or
a new stack trace attached due to the throw.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140520/1e75d315/attachment.html>


More information about the es-discuss mailing list