Vulcan/collections/errors.js

10 lines
317 B
JavaScript
Raw Normal View History

2013-04-13 15:10:07 +09:00
if(Meteor.isClient){
// Local (client-only) collection
Errors = new Meteor.Collection(null);
}
throwError = function(message, type){
type = (typeof type === 'undefined') ? 'error': type;
// Store errors in the 'Errors' local collection
Errors.insert({message:message, type:type, seen: false, show:true});
}