-
-
Notifications
You must be signed in to change notification settings - Fork 135
Conversation
55e4c0e
to
89305b2
Compare
c0c2cde
to
c6309c5
Compare
@benvinegar or @MaxBittker take a look? Main consideration - is Usage pattern is: doSomethingThatTakesCallback(Raven.intercept(function (err, result) {
// err will never be instanceof Error; if it was, intercept caught it, reported, didn't call this cb
// can proceed without patterns like below:
if (err) return next(err);
if (err) return Raven.captureException(err);
}); Another consideration - callback could really just be |
re: naming, the special thing about this intercept function is that it works with the node err callback argument convention, vs the exception world (which doesn't work with async callbacks). That being said, would a name that references this is specifically for callback errs be more descriptive? |
the code lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intercept looks good to me, wrapdomain change seems to make sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This is a little WIPpy, need to test more, but I realized 1) usefulness of an intercept function and 2) some simplifications to wrap.