function ErrnoError(err, syscall, cause) {
    this.cause = cause;
    this.code = err;
    this.message = syscall + ': ' + err +
        (cause ? ': ' + cause.toString() : '');
    this.name = 'ErrnoError';
    this.syscall = syscall;
    Error.captureStackTrace(this, ErrnoError);
}
function ErrnoError(err, syscall, cause) {
    this.cause = cause;
    this.code = err;
    this.message = syscall + ': ' + err +
        (cause ? ': ' + cause.toString() : '');
    this.name = 'ErrnoError';
    this.syscall = syscall;
    Error.captureStackTrace(this, ErrnoError);
}
function ErrnoError ( err , syscall , cause ) { this . cause = cause ; this . code = err ; this . message = syscall + ': ' + err + ( cause ? ': ' + cause . toString ( ) : '' ) ; this . name = 'ErrnoError' ; this . syscall = syscall ; Error . captureStackTrace ( this , ErrnoError ) ; }
Ganked from node https://github.com/joyent/node/blob/v0.10.22-release/lib/fs.js#L1015-L1023
Ganked from node https : // github . com / joyent / node / blob / v0 . 10 . 22 - release / lib / fs . js#L1015 - L1023