Kaydet (Commit) 3607e3de authored tarafından Victor Stinner's avatar Victor Stinner

(Merge 3.2) main() now displays an error message before exiting if a command

line argument cannot be decoded
...@@ -50,8 +50,12 @@ main(int argc, char **argv) ...@@ -50,8 +50,12 @@ main(int argc, char **argv)
#else #else
argv_copy[i] = _Py_char2wchar(argv[i], NULL); argv_copy[i] = _Py_char2wchar(argv[i], NULL);
#endif #endif
if (!argv_copy[i]) if (!argv_copy[i]) {
fprintf(stderr, "Fatal Python error: "
"unable to decode the command line argument #%i\n",
i + 1);
return 1; return 1;
}
argv_copy2[i] = argv_copy[i]; argv_copy2[i] = argv_copy[i];
} }
setlocale(LC_ALL, oldloc); setlocale(LC_ALL, oldloc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment