linx-simulator2/node_modules/precond/lib/errors.js

25 lines
632 B
JavaScript
Raw Normal View History

2019-09-18 08:11:16 +00:00
/*
* Copyright (c) 2012 Mathieu Turcotte
* Licensed under the MIT license.
*/
var util = require('util');
function IllegalArgumentError(message) {
Error.call(this, message);
this.message = message;
}
util.inherits(IllegalArgumentError, Error);
IllegalArgumentError.prototype.name = 'IllegalArgumentError';
function IllegalStateError(message) {
Error.call(this, message);
this.message = message;
}
util.inherits(IllegalStateError, Error);
IllegalStateError.prototype.name = 'IllegalStateError';
module.exports.IllegalStateError = IllegalStateError;
module.exports.IllegalArgumentError = IllegalArgumentError;