On Sat, Sep 19, 2009 at 5:31 AM, Pascal Chambon <chambon.pascal at gmail.com>wrote: > Actually, since Windows Error Codes concern any possible error (IO, file > permissions, memory problems...), I thought the best would be to convert > them to the most appropriate python standard exception, only defaulting to > WindowsError (i.e, OSError's hierarchy) when no other exception type > matches. So at the moment, I use a decorator to automatically convert all > errors on stream operations into IOErrors. Error codes are not the same as > unix ones indeed, but I don't know if it's really important (imo, most > people just want to know if the operation was successful, I don't know if > many developers scan error codes to act accordingly). > I don't often need to check the error code at runtime but seeing the corresponding message is often critical for debugging. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20090919/f68e6350/attachment.htm>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4