On Sat, Sep 19, 2009 at 5:31 AM, Pascal Chambon <chambon.pas...@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>
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com