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

Create router errors #3047

Open
wants to merge 4 commits into
base: dev
from
Open

Create router errors #3047

wants to merge 4 commits into from

Conversation

@lmichelin
Copy link

lmichelin commented Nov 30, 2019

This PR improves the way router errors are thrown.

4 router errors types have been created:

  • NavigationDuplicated
  • NavigationCancelled
  • NavigationRedirected
  • NavigationAborted

Before:

Uncaught (in promise) undefined

After:

Uncaught (in promise) Error: NavigationAborted: Navigating to location ("/foo?abort=y") has been aborted
    at eval (base.js:157)
    at eval (app.js:33)
    at iterator (base.js:153)
    at step (async.js:13)
    at step (async.js:17)
    at runQueue (async.js:21)
    at HashHistory.confirmTransition (base.js:179)
    at HashHistory.transitionTo (base.js:74)
@lmichelin lmichelin force-pushed the lmichelin:create-router-errors branch from 6cb844c to 0b1ebc0 Dec 8, 2019
@lmichelin lmichelin force-pushed the lmichelin:create-router-errors branch from 0b1ebc0 to 2c75090 Dec 8, 2019
@lmichelin

This comment has been minimized.

Copy link
Author

lmichelin commented Dec 8, 2019

@posva I wrote some unit tests, the PR is ready to be reviewed 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Longterm
Awaiting triage
1 participant
You can’t perform that action at this time.