Skip to content

Commit 42ecede

Browse files
rethrow exceptions
1 parent 4f24aff commit 42ecede

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/node_dir.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,8 @@ void DirHandle::Read(const FunctionCallbackInfo<Value>& args) {
321321
static_cast<int>(req_wrap_sync.req.result),
322322
encoding)
323323
.ToLocal(&js_array)) {
324-
// TODO(anonrig): Initializing BufferValue here is wasteful.
325324
CHECK(try_catch.CanContinue());
326-
BufferValue error_payload(isolate, try_catch.Exception());
327-
env->ThrowError(error_payload.out());
325+
try_catch.ReThrow();
328326
return;
329327
}
330328

0 commit comments

Comments
 (0)