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

Remove error-ex as dependency #38

Closed
prisis opened this issue Oct 15, 2023 · 3 comments · Fixed by #43
Closed

Remove error-ex as dependency #38

prisis opened this issue Oct 15, 2023 · 3 comments · Fixed by #43

Comments

@prisis
Copy link
Contributor

prisis commented Oct 15, 2023

Would you accept a PR that will remove "error-ex" as a dependency?

The current implementation could be switched to

Example:

class JSONError extends Error {
  constructor(message) {
    super(message);
    this.name = 'JSONError';
    this.fileName = undefined
    this.codeFrame = undefined
    this.rawCodeFrame = undefined
  }
}
@sindresorhus
Copy link
Owner

Yes

@fisker
Copy link
Contributor

fisker commented Oct 27, 2023

error-ex has the ability to show different message when assign a fileName to error, I think it's useful.

@prisis
Copy link
Contributor Author

prisis commented Oct 29, 2023

You mean this part fileName: errorEx.append('in %s')?

If yes this could be done in the new error too

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.

3 participants