Add missing exception pending checks

This commit is contained in:
Justin Traglia 2023-02-22 09:39:16 -06:00
parent 0e78319a44
commit b34cc3ce1e
1 changed files with 8 additions and 0 deletions

View File

@ -166,6 +166,10 @@ Napi::Value ComputeKzgProof(const Napi::CallbackInfo& info) {
auto z_bytes = extract_byte_array_from_param(info, 1, "zBytes");
auto kzg_settings = info[2].As<Napi::External<KZGSettings>>().Data();
if (env.IsExceptionPending()) {
return env.Null();
}
KZGProof proof;
C_KZG_RET ret = compute_kzg_proof(
&proof,
@ -196,6 +200,10 @@ Napi::Value ComputeBlobKzgProof(const Napi::CallbackInfo& info) {
auto blob = extract_byte_array_from_param(info, 0, "blob");
auto kzg_settings = info[1].As<Napi::External<KZGSettings>>().Data();
if (env.IsExceptionPending()) {
return env.Null();
}
KZGProof proof;
C_KZG_RET ret = compute_blob_kzg_proof(
&proof,