Created
August 26, 2015 02:59
-
-
Save mplatts/c3107be2fd70b2ec18cf to your computer and use it in GitHub Desktop.
Meteor error explanation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see http://docs.meteor.com/#/full/meteor_error | |
var error = new Meteor.Error('error-name', 'reason'); | |
alert(error) //=> Error: reason [error-name] | |
alert(error.reason) //=> reason | |
alert(error.error) //=> error-name | |
// Explanation.. alert(error) is the same as going alert(error.toString()), which results in "Error: error.reason [error.error]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment