[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: Function to determine list max without itertools
From: Chris Angelico <rosuav () gmail ! com>
Date: 2019-04-22 16:48:34
Message-ID: CAPTjJmq2WzRvdeA=zRVWczG-wRBg5Tm8P_LKL3HByUXx0sYwhg () mail ! gmail ! com
[Download RAW message or body]
On Tue, Apr 23, 2019 at 12:45 AM Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> At the very top level _sometimes_ you want to have one single, global,
> try/except to catch all exceptions and handle the nofication and exit
> in a non-default way. For example: in a GUI application, it's
> possible that nobody will see an excption message and stack trace
> that's sent to stderr. A good GUI framework would already handle
> that, but not all do.
I describe that as a "boundary". You can sometimes have those inside
an application, too; for instance, a web server will often want to
catch any unhandled exception during a request handler, log it
somewhere, send an HTTP 500 back to the client, and go back to serving
requests. General principle: a boundary layer will catch EVERY
exception and log them as part of handling them; everything else will
catch only what it can actually handle (and recover from), and usually
won't log them.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic