Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46155
| Date | 2013-05-27 12:02 +1000 |
|---|---|
| From | Cameron Simpson <cs@zip.com.au> |
| Subject | Re: Python error codes and messages location |
| References | <51a2ae95$0$30002$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2227.1369620175.3114.python-list@python.org> (permalink) |
On 27May2013 00:53, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: | On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: | > Where can I find all error codes and messages that Python throws (actual | > codes and messages from exceptions raised by stdlib)? | | There is no list. It is subject to change from version to version, | including point releases. And better still, it is platform specific too. [...] | > I've already found the module 'errno' and got a dictionary | > (errno.errorcode) and some system error messages | > (os.strerror(errno.ENAMETOOLONG)) but there's more I couldn't find. | | These are the standard C operating system and file system error codes, | not Python exceptions. And the poster boy example for platform dependence. Besides, knowing the exact errors that may occur is not the Python Way, it is the Java Way. Run it. if it goes bang, handle the errors you expect and understand. If you get something else, go bang for real because you _don't_ know what should happen, and proceeding is probably insane. Cheers, -- Cameron Simpson <cs@zip.com.au> Motorcycles are like peanuts... who can stop at just one? - Zebee Johnstone <zebee@zip.com.au> aus.motorcycles Poser Permit #1
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python error codes and messages location Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-27 02:13 +0300
Re: Python error codes and messages location Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-27 00:53 +0000
RE: Python error codes and messages location Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-27 04:49 +0300
Re: Python error codes and messages location Cameron Simpson <cs@zip.com.au> - 2013-05-27 12:02 +1000
csiph-web