Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JSError.stack, add Error conformance (#48)
While the `stack` property is non-standard, it's [supported in all popular browser engines](https://caniuse.com/mdn-javascript_builtins_error_stack) and Node.js. Unfortunately, because `stack` value will be different on every machine that executes it, I'm not sure how to write a good test for it, so it currently has only a single test. Also, `JSError` now conforms to `Error`. The main reasoning is that the `Publisher` protocol in Combine requires `Error` conformance on its `Failure` type. I think in the future it would make sense to make `JSPromise` compatible with Combine, so it would be great if one could propagate errors produced by `JSPromise` to other publishers/subscribers.
- Loading branch information