Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46155

Re: Python error codes and messages location

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:error': 0.03; 'one?': 0.05; 'subject:Python': 0.06; 'happen,': 0.09; 'subject:messages': 0.09; 'throws': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.18; 'module': 0.19; 'else,': 0.19; 'example': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'java': 0.24; 'mon,': 0.24; 'cheers,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'errors': 0.30; 'too.': 0.31; "d'aprano": 0.31; 'exceptions': 0.31; 'raised': 0.31; 'steven': 0.31; 'file': 0.32; 'probably': 0.32; 'run': 0.32; 'something': 0.35; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'operating': 0.37; 'list.': 0.37; 'received:211': 0.38; 'version,': 0.38; 'handle': 0.38; 'expect': 0.39; "couldn't": 0.39; 'content-disposition:inline': 0.62; 'real': 0.63; 'more': 0.64; 'occur': 0.65; 'subject': 0.69; 'bang': 0.84; 'find.': 0.84; 'motorcycles': 0.84; 'subject:location': 0.84; 'carlos': 0.91; 'releases.': 0.91; 'besides,': 0.93; '2013': 0.98
Date Mon, 27 May 2013 12:02:41 +1000
From Cameron Simpson <cs@zip.com.au>
To "Steven D'Aprano" <steve+comp.lang.python@pearwood.info>
Subject Re: Python error codes and messages location
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <51a2ae95$0$30002$c3e8da3$5496439d@news.astraweb.com>
User-Agent Mutt/1.5.21 (2010-09-15)
References <51a2ae95$0$30002$c3e8da3$5496439d@news.astraweb.com>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.0 cv=BPvrNysG c=1 sm=1 a=wom5GMh1gUkA:10 a=ucCMCMo_fuEA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=ZtCCktOnAAAA:8 a=yHQ-DHP2zOYA:10 a=kZ7UWmmPAAAA:8 a=Pl4OinkrndEfk9sPYkAA:9 a=CjuIK1q_8ugA:10 a=pyH5b1fOeEsA:10 a=ChdAjXE5lkUvdteQbhpnkQ==:117
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2227.1369620175.3114.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369620175 news.xs4all.nl 15958 [2001:888:2000:d::a6]:54339
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46155

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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