Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46177
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.020 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'subject:error': 0.03; 'represents': 0.05; 'root': 0.05; 'subject:Python': 0.06; 'plenty': 0.07; 'exist,': 0.09; 'subject:messages': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'incorrect': 0.16; 'ioerror': 0.16; 'maliciously': 0.16; 'simpson': 0.16; 'smattering': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'properly': 0.19; 'handles': 0.22; 'error': 0.23; 'entries': 0.24; 'errors.': 0.24; 'sends': 0.24; 'mon,': 0.24; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'points': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'raised': 0.31; 'file': 0.32; 'there.': 0.32; 'run': 0.32; 'open': 0.33; 'device': 0.34; 'sense': 0.34; "i'd": 0.34; 'could': 0.34; 'something': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'disk': 0.36; 'too': 0.37; 'server': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'volume': 0.39; 'to:addr:python.org': 0.39; 'catch': 0.60; 'details.': 0.61; "you're": 0.61; 'back': 0.62; 'information': 0.63; 'more': 0.64; 'different': 0.65; 'million': 0.74; 'crafted': 0.84; 'fat': 0.84; 'heh.': 0.84; 'subject:location': 0.84; 'sweat': 0.84; 'carlos': 0.91; 'quota': 0.93; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XneJQW0MMTwwAIlCk2w9QAElrdKbSRbYzgUEwyOtkjw=; b=vCmw5Rskjfr6ITlbrfeD6Z+2r1AaGtzNXPPqoy67bvSTclZDg8KZJuevIgVurAULhq VDuceBT1O6Fe2IvOBt5sWyRKnxMfFQ+QknzkCu0ptxQXv/uH0NnoiWloA3TRXzFNACCs 48JScyqr6G6KPybNEpvu83sJlw+Lm9V/POrSWwGf64TXhTaCUI53M51pgWCUqjY3PlJB cfsLZdNcInSMYp5CbzbAxDVtoLgKP9562kS4bgkLWZkLymSBk9De762IlJEBxSXvsF94 mu9SyUiYJWl9yhgE00VMEpuvV8VlxZvkaw0aDADz5r06ZIwgu1HUvsC5eUJUGsyHShrz +bJQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.106.74 with SMTP id w10mr14658944vco.32.1369640865907; Mon, 27 May 2013 00:47:45 -0700 (PDT) |
| In-Reply-To | <20130527061154.GA3301@cskk.homeip.net> |
| References | <BLU176-W2F86295ACD2E1CD29375BD7960@phx.gbl> <20130527061154.GA3301@cskk.homeip.net> |
| Date | Mon, 27 May 2013 17:47:45 +1000 |
| Subject | Re: Python error codes and messages location |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.2240.1369640875.3114.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369640875 news.xs4all.nl 15988 [2001:888:2000:d::a6]:58003 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46177 |
Show key headers only | View raw
On Mon, May 27, 2013 at 4:11 PM, Cameron Simpson <cs@zip.com.au> wrote: > On 27May2013 04:49, Carlos Nepomuceno <carlosnepomuceno@outlook.com> wrote: > | That's bad! I'd like to check all the IOError codes that may be > | raised by a function/method but the information isn't there. > > No, you really don't. Heh. I concur. Opening a file can generate roughly forty-two million different errors. Here's a smattering that you might not be expecting: * The path points somewhere that's not currently mounted * The path represents a device that is not properly working * It's over a network and the server at the far end is down * It's over a network and the server sends back maliciously crafted data * It's over a network and the server sends back an incorrect error code * You tried to open something that doesn't exist, and your disk quota is used up * The system has run out of handles * You're trying to create something in the root directory of a FAT volume that already has too many root directory entries And plenty more besides. Those are just a few that I could come up with off the top of my head. Just catch whatever makes sense (IOError maybe), and don't sweat the details. ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Python error codes and messages location Chris Angelico <rosuav@gmail.com> - 2013-05-27 17:47 +1000
csiph-web