1{ 2 "Napi get last error info ": { 3 "prefix": "napigetlasterrorinfo", 4 "body": [ 5 "// Retrieve detailed information about the last N-API error that occurred in the given environment.", 6 "const napi_extended_error_info* errorInfo;", 7 "napi_get_last_error_info(env, &errorInfo);" 8 ] 9 }, 10 "Napi throw error ": { 11 "prefix": "napithrowerror", 12 "body": [ 13 "// Create and throw a JavaScript Error with a specified code and message.", 14 "const char* code = \"ERROR_CODE\";", 15 "const char* msg = \"error message.\";", 16 "napi_throw_error(env, code, msg);" 17 ] 18 } 19}