Skip to content

Commit

Permalink
fix: remove duplication of serialized Error properties (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonutEspresso authored May 30, 2018
1 parent 31a8a89 commit 1da7c76
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,8 @@ function getSerializedContext(err) {
return out.slice(0, -2);
}

var ret = ' (';

// construct context info
if (hasContext === true) {
ret += serializeIntoEqualString(err.context);
}

// construct VError info object
if (hasVErrorInfo === true) {
ret += serializeIntoEqualString(verrorInfo);
}

ret += ')\n';

var fullInfo = _.assign({}, err.context, verrorInfo);
var ret = ' (' + serializeIntoEqualString(fullInfo) + ')\n';
return ret;
}

Expand Down

0 comments on commit 1da7c76

Please sign in to comment.