Skip to content

Commit c37c225

Browse files
dario-piotrowiczaduh95
authored andcommitted
src: improve error message for invalid child stdio type in spawn_sync
PR-URL: #57589 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent bb4813e commit c37c225

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/spawn_sync.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,10 @@ Maybe<int> SyncProcessRunner::ParseStdioOption(int child_fd,
10551055
return Just(AddStdioInheritFD(child_fd, inherit_fd));
10561056
}
10571057

1058-
UNREACHABLE("invalid child stdio type");
1058+
Utf8Value stdio_type(env()->isolate(), js_type);
1059+
fprintf(stderr, "invalid child stdio type: %s\n", stdio_type.out());
1060+
1061+
UNREACHABLE();
10591062
}
10601063

10611064
int SyncProcessRunner::AddStdioIgnore(uint32_t child_fd) {

0 commit comments

Comments
 (0)