Skip to content

Commit

Permalink
fs: removing unnecessary assignment
Browse files Browse the repository at this point in the history
In `rethrow` function, instead of assigning to `err` and throwing
`err`, we can directly throw `backtrace` object itself.
  • Loading branch information
thefourtheye committed Jun 2, 2015
1 parent 2aabff9 commit 40d4c54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ function rethrow() {
if (err) {
backtrace.stack = err.name + ': ' + err.message +
backtrace.stack.substr(backtrace.name.length);
err = backtrace;
throw err;
throw backtrace;
}
};
}
Expand Down

0 comments on commit 40d4c54

Please sign in to comment.