Message206284
On 16.12.2013 10:02, STINNER Victor wrote:
>
> Maybe we should modify Py_FatalError() to call exit(1) in release mode, and only call abort() in debug mode? Dumping a core dump, opening a Windows fatal error popup, calling Fedora ABRT handler, etc. is maybe not very useful, especially for the KeyboardInterrupt case.
I don't think changing Py_FatalError() is a good idea. However,
its use in this particular case (streams not initializing) appears
wrong.
Python should simply exit with an error code in such a case; which then
also allows the calling script or application to react to the error.
The fatal error is reserved for cases where you cannot continue
and can't even report back an error, not even as error code.
Those are rare situations. You usually only use abort() if you need
to debug the situation via a core dump, which is not needed in
this case, since we know that the user caused a keyboard
interrupt and in most other cases know that it's a config problem,
not a problem in the C implementation of Python. |
|
Date |
User |
Action |
Args |
2013-12-16 09:17:07 | lemburg | set | recipients:
+ lemburg, tim.peters, pitrou, vstinner, tim.golden, brian.curtin, Jurko.Gospodnetić |
2013-12-16 09:17:07 | lemburg | link | issue19983 messages |
2013-12-16 09:17:07 | lemburg | create | |
|