Vulcan/common/errors.js
2012-10-19 19:20:14 +09:00

8 lines
No EOL
311 B
JavaScript

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});
}
clearSeenErrors = function(){
Errors.update({seen:true}, {$set: {show:false}}, {multi:true});
}