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 baa8c37 commit de2a7f1
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 @@ -49,8 +49,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 de2a7f1

Please sign in to comment.