List of WindowsError error codes and meanings
Genstein
genstein at invalid.invalid
Sat May 21 11:35:18 EDT 2011
> Andrew Berg<bahamutzero8825 at gmail.com> writes:
> Since Python 2.5, the errno attribute maps the Windows error to error
> codes that match the attributes of module errno.
Good point, I completely misread that. At least the Windows error code
is still available as the winerror attribute.
As an aside - call me stupid, but I don't quite follow the purpose of
that errno mapping. Surely if the error number can be mapped
successfully then the error isn't Windows specific and an OSError should
logically be thrown instead? And if it can't be mapped successfully then
errno will never be valid so the mapping is pointless?
I guess if the mapping is imprecise then it makes some sense as errno is
a convenience to avoid people having to grasp the meaning of the many
and various winerror.h values. So perhaps I've answered my own question.
More information about the Python-list
mailing list