Re: [whatwg/streams] better-assert is broken (#985)

> Seems like a good idea to me (perhaps even in jsdom itself), but be sure to guard it so that if e.detail is not an error or otherwise does not have a stack property, you output e.detail instead.

Agreed, the code should be more robust. The snippet was only meant as proof-of-concept, really. 😛

Should we still log `e.stack` as well, so the user knows that the error was forwarded by `jsdom`? Something like:
```js
if (e.detail) {
  console.error(e.detail.stack || e.detail, "\n", e.stack);
} else {
  console.error(e.stack);
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/985#issuecomment-467086021

Received on Monday, 25 February 2019 16:48:45 UTC