Skip to content

n-api: remove unnecessary try-catch bracket from certain APIs

These APIs do not need a try-catch around their body, because no exceptions are thrown in their implementation:

  • napi_is_array()
  • napi_get_value_string_latin1()
  • napi_get_value_string_utf8()
  • napi_get_value_string_utf16()
  • napi_get_value_external()
  • napi_is_buffer()
  • napi_is_arraybuffer()
  • napi_get_arraybuffer_info()
  • napi_is_typedarray()
  • napi_get_typedarray_info()

Fixes https://github.com/nodejs/abi-stable-node/issues/238

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

n-api

Merge request reports

Loading