You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
470 B

'use strict';
module.exports = IOError;
function IOError(cause, prefix) {
var err = new Error(prefix + ': ' + cause.message);
Object.defineProperty(err, 'type', {
value: 'error.IOError',
configurable: true,
enumerable: true
});
err.name = 'WrappedIOError';
err.statusCode = 500;
Object.defineProperty(err, 'cause', {
value: cause,
configurable: true,
enumerable: false
});
return err;
}