Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in output between error.stack and thrown error #2710

Closed
ry opened this issue Aug 2, 2019 · 0 comments · Fixed by #4690
Closed

Discrepancy in output between error.stack and thrown error #2710

ry opened this issue Aug 2, 2019 · 0 comments · Fixed by #4690

Comments

@ry
Copy link
Member

ry commented Aug 2, 2019

class Foo extends Error {
  constructor() {
    super();
    this.name = "Foo";
  }
}
const error = new Foo;
console.log(error.stack);
throw error;

output:

> deno y.js
Foo:
    at file:///Users/rld/src/deno/y.js:8:15
error: Uncaught Foo
    at Foo (file:///Users/rld/src/deno/y.js:3:5)
    at file:///Users/rld/src/deno/y.js:8:15

reported by @Nayeem-Rahman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant