homebase-error
Version:
rokid homebase standard error
11 lines (9 loc) • 310 B
JavaScript
function HomebaseError(message, name){
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name;
this.message = message;
this.errorName = name || 'E_DRIVER_ERROR';
this.code = this.errorName;
}
require('util').inherits(HomebaseError, Error);
module.exports = HomebaseError;