diff options
Diffstat (limited to 'src/node_binding.cc')
-rw-r--r-- | src/node_binding.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/node_binding.cc b/src/node_binding.cc index d083c64d102..f57ddb54b62 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -484,7 +484,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) { mp = dlib->GetSavedModuleFromGlobalHandleMap(); if (mp == nullptr || mp->nm_context_register_func == nullptr) { dlib->Close(); - env->ThrowError("Module did not self-register."); + char errmsg[1024]; + snprintf(errmsg, + sizeof(errmsg), + "Module did not self-register: '%s'.", + *filename); + env->ThrowError(errmsg); return false; } } |