Skip to content

Commit

Permalink
NAPI_ASSERT
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Aug 4, 2023
1 parent 781fd36 commit 97e6209
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/test/object/test_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ static napi_value TestExceptions(napi_env env, napi_callback_info info) {
#define PROCEDURE(call) \
{ \
status = (call); \
assert(status == napi_pending_exception); \
NAPI_CALL(env, napi_is_exception_pending(env, &is_exception_pending)); \
assert(is_exception_pending); \
NAPI_ASSERT( \
env, status == napi_pending_exception, "expect exception pending"); \
NAPI_CALL(env, napi_is_exception_pending(env, &is_exception_pending)); \
NAPI_ASSERT(env, is_exception_pending, "expect exception pending"); \
NAPI_CALL(env, napi_get_and_clear_last_exception(env, &exception)); \
}
// discard the exception values.
Expand Down

0 comments on commit 97e6209

Please sign in to comment.