-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX release] Do not throw uncaught errors mid-transition. #5166
Conversation
The correct thing in general would be to throw the error (which was being done before this), but that leads to an issue when transitioning into the |
@machty - Can you review and +1/-1 ? |
Assuming all is well, this will be pulled into the stable branch, and released as 1.6.1. |
@@ -833,7 +833,7 @@ function listenForTransitionErrors(transition) { | |||
} else if (error.name === 'TransitionAborted') { | |||
// just ignore TransitionAborted here | |||
} else { | |||
throw error; | |||
Ember.Logger.error(error.stack); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this behave on older browsers that don't have Error#stack
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not provide meaningful information (error.stack
is undefined
), but it does not throw an error.
Just updated to share the error logging logic from the default error
action handler.
The primary intent of this was to rethrow the error when it wasn't a known (ignorable) type, and the default RSVP error handler would ensure that it was printed to the console. This worked wonderfully, except that it caused an error to occur (an `Ember.assert` throws an error) during the rendering of the `error` route (or template). This changes from `throw`ing the error to just logging it, but the userland result is the same: useful console error messages showing when bad things happen in route hook promises.
LGTM |
[BUGFIX release] Do not throw uncaught errors mid-transition.
Can anyone comment on if this is related? http://emberjs.jsbin.com/degag/3/edit Case 4 (throwing a string) transitions to the error route but the model is null, using Ember 1.6.1. |
I think it's because it internally converted into |
The primary intent of this was to rethrow the error when it wasn't a known (ignorable) type, and the default RSVP error handler would ensure that it was printed to the console.
This worked wonderfully, except that it caused an error to occur (an
Ember.assert
throws an error) during the rendering of theerror
route (or template).This changes from
throw
ing the error to just logging it, but the userland result is the same: useful console error messages showing when bad things happen in route hook promises.Closes #5148.
1.6.1 will need to be released after this has been merged.