Vulcan/common/errors.js

8 lines
311 B
JavaScript
Raw Normal View History

2012-10-08 10:44:13 +09:00
throwError = function(message, type){
type = (typeof type === 'undefined') ? 'error': type;
// Store errors in the 'Errors' local collection
2012-10-08 10:44:13 +09:00
Errors.insert({message:message, type:type, seen: false, show:true});
}
clearSeenErrors = function(){
Errors.update({seen:true}, {$set: {show:false}}, {multi:true});
}