Skip to content

Commit

Permalink
catch errors in column.getValue
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jun 2, 2023
1 parent cf33b6a commit 218074f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/cudf/src/column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ Napi::Value Column::get_child(Napi::CallbackInfo const& info) {
}

Napi::Value Column::get_value(Napi::CallbackInfo const& info) {
return Napi::Value::From(info.Env(), cudf::get_element(*this, info[0].ToNumber()));
try {
return Napi::Value::From(info.Env(), cudf::get_element(*this, info[0].ToNumber()));
} catch (std::exception const& e) { throw Napi::Error::New(Env(), e.what()); }
}

} // namespace nv

0 comments on commit 218074f

Please sign in to comment.