Skip to content

Commit

Permalink
fixup! remove the newly added napi_pending_exception checks
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Jun 3, 2021
1 parent 451f27f commit 0f95980
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions napi.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,12 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t), "Size mismatch between char16
} while (0)

#define NAPI_THROW_IF_FAILED(env, status, ...) \
if ((status) == napi_pending_exception) { \
return __VA_ARGS__; \
} \
if ((status) != napi_ok) { \
Napi::Error::New(env).ThrowAsJavaScriptException(); \
return __VA_ARGS__; \
}

#define NAPI_THROW_IF_FAILED_VOID(env, status) \
if ((status) == napi_pending_exception) { \
return; \
} \
if ((status) != napi_ok) { \
Napi::Error::New(env).ThrowAsJavaScriptException(); \
return; \
Expand Down

0 comments on commit 0f95980

Please sign in to comment.