Author vstinner
Recipients Jurko.Gospodnetić, brian.curtin, lemburg, pitrou, tim.golden, tim.peters, vstinner
Date 2013-12-16.09:30:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwas3_KqnPQ+XB3U=w7vw3CZ59r0GDHqEmv=bVNPN=+xTg@mail.gmail.com>
In-reply-to <52AEC510.1050407@egenix.com>
Content
2013/12/16 Marc-Andre Lemburg <report@bugs.python.org>:
> 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.

Before exiting, you need a message. If there is also an exception, you
may want to display it. If there is no exception, you may want to
display the Python traceback. All these tasks are already implemented
in Py_FatalError.

If the defaullt behaviour of Py_FatalError() cannot be modified, a new
function should be be added, a function sharing its code with
Py_FatalError().

Example: a new private function "void initerror(const char *message)"
only used during Py_Initialize().
History
Date User Action Args
2013-12-16 09:30:19vstinnersetrecipients: + vstinner, lemburg, tim.peters, pitrou, tim.golden, brian.curtin, Jurko.Gospodnetić
2013-12-16 09:30:19vstinnerlinkissue19983 messages
2013-12-16 09:30:19vstinnercreate