Message64113
| Author |
belopolsky |
| Recipients |
belopolsky, schmir, terry.reedy |
| Date |
2008年03月19日.22:02:57 |
| SpamBayes Score |
0.056554303 |
| Marked as misclassified |
No |
| Message-id |
<d38f5330803191502p120df2bcqecafe85f080c0ae2@mail.gmail.com> |
| In-reply-to |
<1205962117.15.0.169796240888.issue2413@psf.upfronthosting.co.za> |
| Content |
And on some system "Unknown error: nnn" is returned with no error indication.
Your concern that the patch is invalid on some unidentified system.
This concern
can easily be addressed by checking for NULL return *in addition* to
the errno check.
The real question is whether it is desirable to raise ValueError from
strerror() when
error code is out of bound. I would say the existing code intends to
do exactly that,
but th error check is incorrect on at least one popular platform. I
believe it is better
to raise an error because as a user, seeing "unknown error has
occurred" message,
is one of the worst experiences.
On the other hand, if the consensus is that strerror() should always
(short of out of
memory condition) return a string, then (assuming null return is a
possibility) the code
needs to be changed to return "Unknown error: nnn" instead of raising an error. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年03月19日 22:02:58 | belopolsky | set | spambayes_score: 0.0565543 -> 0.056554303 recipients:
+ belopolsky, terry.reedy, schmir |
| 2008年03月19日 22:02:57 | belopolsky | link | issue2413 messages |
| 2008年03月19日 22:02:57 | belopolsky | create |
|