1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: improve diagnostic output on failure

This commit is contained in:
Delyan Angelov
2020-05-04 11:21:25 +03:00
committed by GitHub
parent e0e064ff08
commit acd80f052b
10 changed files with 90 additions and 42 deletions

View File

@ -308,7 +308,7 @@ pub fn exec(cmd string) ?Result {
create_process_ok := C.CreateProcessW(0, command_line, 0, 0, C.TRUE, 0, 0, 0, voidptr(&start_info), voidptr(&proc_info))
if !create_process_ok {
error_msg := get_error_msg(int(C.GetLastError()))
return error('exec failed (CreateProcess): $error_msg')
return error('exec failed (CreateProcess): $error_msg cmd: $cmd')
}
C.CloseHandle(child_stdin)
C.CloseHandle(child_stdout_write)