File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -685,8 +685,7 @@ void ModuleWrap::Resolve(const FunctionCallbackInfo<Value>& args) {
685
685
Maybe<URL> result = node::loader::Resolve (env, specifier_std, url);
686
686
if (result.IsNothing () || (result.FromJust ().flags () & URL_FLAGS_FAILED)) {
687
687
std::string msg = " Cannot find module " + specifier_std;
688
- env->ThrowError (msg.c_str ());
689
- return ;
688
+ return node::THROW_ERR_MISSING_MODULE (env, msg.c_str ());
690
689
}
691
690
692
691
args.GetReturnValue ().Set (result.FromJust ().ToObject (env));
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ namespace node {
21
21
V (ERR_INDEX_OUT_OF_RANGE, RangeError) \
22
22
V (ERR_INVALID_ARG_TYPE, TypeError) \
23
23
V (ERR_MEMORY_ALLOCATION_FAILED, Error) \
24
+ V (ERR_MISSING_MODULE, Error) \
24
25
V (ERR_STRING_TOO_LONG, Error) \
25
26
V (ERR_BUFFER_TOO_LARGE, Error)
26
27
You can’t perform that action at this time.
0 commit comments