1.0.1 • Published 9 years ago

better-fs-errors v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

better-fs-errors

better-fs-errors is a node module that improves the way fs (file system) errors look. It uses the errno module to provide more helpful error messages based on the error code provided by node. This has not been fully tested with every possible error, so please report any issues you run into here.

Before:

Error: ENOENT, open 'path\to\problem\file'
    at Error (native)

After:

------------------------------------------------
RAW ERROR:
Error: ENOENT, open 'path\to\problem\file'

ERROR DESCRIPTION:
no such file or directory
------------------------------------------------

Installation & Usage

Installing via npm

npm install better-fs-errors

Including the module

var bfe = require('better-fs-errors');

Using

throw bfe(err);

NOTE: If it can't find your error code in errno, it will return the original error.

Dependencies

1.0.1

9 years ago

1.0.0

9 years ago