-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I see you have this nice function below which displays the actual error message. You should make this part of this package so that everyone doesn't have to manually implement this method.
function errmsg(err) {
var str = 'Error: '
// if it's a libuv error then get the description from errno
if (errno.errno[err.errno]) {
str += errno.errno[err.errno].description
} else {
str += err.message
}
// if it's a `fs` error then it'll have a 'path' property
if (err.path) {
str += ' [' + err.path + ']'
}
return str
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels