-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
info: comparing verror
and @Netflix/nerror
#75
Comments
verror
and @Netflix/nerror
verror
and @Netflix/nerror
I'm closing this. It was informational. |
@trentm I absolutely love VError and I'm surprised it's not more commonly used. As you've been around since the beginning (and at the risk of sounding silly?), it's alway bothered me that I don't know what the 'V' stands for, do you know? |
This is not an answer for what "V" stands for but I also wanted to chime in
to say that this is a very useful library.
It would be a nice addition to the ES standard as it allows for systematic
recording of a chain of errors which when reported correctly can simplify
finding the root cause of a problem.
- Kayo
…On Sun, Jun 21, 2020 at 8:07 PM Richard Scarrott ***@***.***> wrote:
@trentm <https://github.com/trentm> I absolutely love VError and I'm
surprised it's not more commonly used. As you've been around since the
beginning (and at the risk of sounding silly?), it's alway bothered me that
I don't know what the 'V' stands for, do you know?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABCICNMCBWA7MB72G3DSSLRXYLI7ANCNFSM4JEZDTXA>
.
|
@richardscarrott The story of the name is a little silly: the first purpose for VError was to provide a printf-like format string for constructing errors. (Causes and informational properties came later.) In C, a bunch of the printf-related functions use @richardscarrott @kayomarz It's very gratifying to hear this has been helpful for you! |
(It is perhaps a little odd that I opened this as an "issue". I wanted to record this somewhere associated with the project, so here it is. Because there isn't a thing to complete/resolve here, I propose to close this issue soon.)
Comparing
verror
and@Netflix/nerror
A while back Netflix did a "friendly" fork of https://github/joyent/node-verror to https://github.com/Netflix/nerror. Its readme includes:
I've been a user of verror for years as an employee of Joyent and have been around for its entire development and have made some small contributions to it. It's primary author, davepacheco, no longer works at Joyent. As part of moving Joyent code reviews from a Gerrit instance to GitHub PRs I was taking a look at some Gerrit CRs for node-verror. In particular there are two GH issues, two PRs, and three CRs (some closed, some not) regarding VError usage of printf that led to
options.skipPrintf
andPError
support in@Netflix/nerror
and this PR for the same inverror
. See #63 for current discussion on that.So how do these two modules compare?
nerror
has not broken compatibility withverror
That's good! If I run nerror's test suite against
verror/lib/verror.js
it passes after I comment out the test cases for new functionality added to nerror.That "new functionality" is:
VError.isVError
skipPrintf
andPError
support that started this<verror instance>.info()
method<verror instance>.assignInfo()
methoderrorFromList([...])
is not an Error classverror
tests pass usingnerror/lib/verror.js
This is good too. If I run verror's test suite against
nerror/lib/verror.js
it works after these trivial changes:In other words:
lodash
depHow does
nerror
differ?These are my opinions.
Pros:
Cons:
Questions:
lodash
dep (4.8M installed) overkill forlodash.isError()
vscore-util-is.isError
? Actually perhaps this could be changed tolodash.iserror
(16K installed)?@netflix/nerror
, FWIW.The text was updated successfully, but these errors were encountered: