Skip to content

Instantly share code, notes, and snippets.

@mplatts
Created August 26, 2015 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mplatts/c3107be2fd70b2ec18cf to your computer and use it in GitHub Desktop.
Save mplatts/c3107be2fd70b2ec18cf to your computer and use it in GitHub Desktop.
Meteor error explanation
// 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