Skip to content
Prev Previous commit
Next Next commit
fixup! remove the newly added napi_pending_exception checks
  • Loading branch information
legendecas committed Jun 3, 2021
commit 0f95980dc1316f6769ed555e0e2abdfd3b711b3c
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