Skip to content

Instantly share code, notes, and snippets.

@jordanyaker
Created April 19, 2012 17:14
Show Gist options
  • Save jordanyaker/2422396 to your computer and use it in GitHub Desktop.
Save jordanyaker/2422396 to your computer and use it in GitHub Desktop.
Error Definitions
/* errors.default.coffee
--------------------------------------------------------------------------*/
@Errors.add
key: /(.+)/
value:
'10001' : 'An e-mail address is required for a user.'
'10002' : 'The specified e-mail address is already in use.'
'10003' : 'The specified e-mail address is invalid.'
'10004' : 'A name is required for a user.'
'10005' : 'The specified user name is invalid.'
'10006' : 'A password is required for a user.'
'10007' : 'The specified password is invalid.'
'10008' : 'The user with the supplied ID cannot be located.'
'Default': 'An unexpected error has occurred.'
/* errors.default.js
--------------------------------------------------------------------------*/
(function() {
this.Errors.add({
key: /(.+)/,
value: {
'10001': 'An e-mail address is required for a user.',
'10002': 'The specified e-mail address is already in use.',
'10003': 'The specified e-mail address is invalid.',
'10004': 'A name is required for a user.',
'10005': 'The specified user name is invalid.',
'10006': 'A password is required for a user.',
'10007': 'The specified password is invalid.',
'10008': 'The user with the supplied ID cannot be located.',
'Default': 'An unexpected error has occurred.'
}
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment