From de2a7f1a213169690649a742d43e713606848090 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Tue, 2 Jun 2015 22:46:15 +0530 Subject: [PATCH] fs: removing unnecessary assignment In `rethrow` function, instead of assigning to `err` and throwing `err`, we can directly throw `backtrace` object itself. --- lib/fs.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 40f123e45de199..eb5f69c3990be2 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -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; } }; }