MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / OnError

Method OnError

napi-inl.h:5691–5696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5689}
5690
5691inline void AsyncWorker::OnError(const Error& e) {
5692 if (!_callback.IsEmpty()) {
5693 _callback.Call(_receiver.Value(),
5694 std::initializer_list<napi_value>{e.Value()});
5695 }
5696}
5697
5698inline void AsyncWorker::SetError(const std::string& error) {
5699 _error = error;

Callers

nothing calls this directly

Calls 3

IsEmptyMethod · 0.80
CallMethod · 0.80
ValueMethod · 0.80

Tested by

no test coverage detected