@@ -58,17 +58,17 @@ Local<Value> ErrnoException(Isolate* isolate,
5858 Local<Object> obj = e.As <Object>();
5959 obj->Set (env->context (),
6060 env->errno_string (),
61- Integer::New (isolate, errorno)).FromJust ();
62- obj->Set (env->context (), env->code_string (), estring).FromJust ();
61+ Integer::New (isolate, errorno)).Check ();
62+ obj->Set (env->context (), env->code_string (), estring).Check ();
6363
6464 if (path_string.IsEmpty () == false ) {
65- obj->Set (env->context (), env->path_string (), path_string).FromJust ();
65+ obj->Set (env->context (), env->path_string (), path_string).Check ();
6666 }
6767
6868 if (syscall != nullptr ) {
6969 obj->Set (env->context (),
7070 env->syscall_string (),
71- OneByteString (isolate, syscall)).FromJust ();
71+ OneByteString (isolate, syscall)).Check ();
7272 }
7373
7474 return e;
@@ -144,13 +144,13 @@ Local<Value> UVException(Isolate* isolate,
144144
145145 e->Set (env->context (),
146146 env->errno_string (),
147- Integer::New (isolate, errorno)).FromJust ();
148- e->Set (env->context (), env->code_string (), js_code).FromJust ();
149- e->Set (env->context (), env->syscall_string (), js_syscall).FromJust ();
147+ Integer::New (isolate, errorno)).Check ();
148+ e->Set (env->context (), env->code_string (), js_code).Check ();
149+ e->Set (env->context (), env->syscall_string (), js_syscall).Check ();
150150 if (!js_path.IsEmpty ())
151- e->Set (env->context (), env->path_string (), js_path).FromJust ();
151+ e->Set (env->context (), env->path_string (), js_path).Check ();
152152 if (!js_dest.IsEmpty ())
153- e->Set (env->context (), env->dest_string (), js_dest).FromJust ();
153+ e->Set (env->context (), env->dest_string (), js_dest).Check ();
154154
155155 return e;
156156}
@@ -219,21 +219,21 @@ Local<Value> WinapiErrnoException(Isolate* isolate,
219219
220220 Local<Object> obj = e.As <Object>();
221221 obj->Set (env->context (), env->errno_string (), Integer::New (isolate, errorno))
222- .FromJust ();
222+ .Check ();
223223
224224 if (path != nullptr ) {
225225 obj->Set (env->context (),
226226 env->path_string (),
227227 String::NewFromUtf8 (isolate, path, NewStringType::kNormal )
228228 .ToLocalChecked ())
229- .FromJust ();
229+ .Check ();
230230 }
231231
232232 if (syscall != nullptr ) {
233233 obj->Set (env->context (),
234234 env->syscall_string (),
235235 OneByteString (isolate, syscall))
236- .FromJust ();
236+ .Check ();
237237 }
238238
239239 if (must_free) {
0 commit comments