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

Mark NesErrors as coming from nes #228

Merged
merged 4 commits into from
Mar 15, 2018

Conversation

dominykas
Copy link
Contributor

  • Added isNes property so the consumers can handle nes errors differently if they chose to
  • Add constants for NesError types (mostly to make the usages more searchable and visible in one place)
  • Added a [re]throw inside NesError to ensure stack on IE11

This makes it easier to reason about errors coming from nes - the use case is to try to customize an error message shown to the end user based on error type for passing on to support/helpdesk.
IE does not initialize the `stack` property until the error is thrown.
@mtharrison mtharrison added the feature New functionality or improvement label Mar 15, 2018
@mtharrison mtharrison merged commit ea8f295 into hapijs:master Mar 15, 2018
@mtharrison mtharrison added this to the 7.2.0 milestone Mar 15, 2018
@mtharrison mtharrison self-assigned this Mar 15, 2018
@dominykas dominykas deleted the nes-error-is-nes branch March 15, 2018 08:02
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants