UNPKG

mhl-dispatcher

Version:

A node dispatcher server for running and managing batch processes

31 lines (25 loc) 959 B
var util = require('util'), logger = require('./logger.js'), error = {}; module.exports = error; var AbstractError = function(msg, constr){ Error.captureStackTrace(this, constr || this); this.message = msg || 'Error'; }; util.inherits(AbstractError, Error); AbstractError.prototype.name = 'Abstract Error'; error.ServerError = function(msg){ error.ServerError.super_.call(this, msg, this.constructor); }; util.inherits(error.ServerError, AbstractError); error.ServerError.prototype.name = 'Server Error'; error.DatabaseError = function(msg){ error.DatabaseError.super_.call(this, msg, this.constructor); }; util.inherits(error.DatabaseError, AbstractError); error.DatabaseError.prototype.name = 'Database Error'; error.ProcessError = function(msg){ error.ProcessError.super_.call(this, msg, this.constructor); }; util.inherits(error.ProcessError, AbstractError); error.ProcessError.prototype.name = 'Process Error';