[Zope3-dev] Please, no bare 'except:' clauses!
Guido van Rossum
guido@python.org
Tue, 12 Nov 2002 08:13:22 -0500
> > > where the outermost driver needs to prevent the
> > > exception from percolating out of the framework, or the framework
> > > wants to log the exception and move on. E.g.
> > > [...]
> > This feels similar to the command line processor in e.g. IDLE.
[Ken]
> I call these things "executors" or "executives" - some layer that is
> responsible for executing code passed in from a higher layer.
Hm, that term doesn't really strike me as the right one either. Plus,
I disagree with your description: it's not that the work comes from an
outer layer -- it comes from *outside*, hence the usual thought given
to exceptions it may raise doesn't apply.
> > The common characteristic seems to be that these take external
> > descriptions of some work to be done, and they should report success
> > or failure, plus details like output or traceback. RPC servers
> > typically also do this: any exceptions raised by an incoming call
> > should be caught and propagated to the client, rather than killing the
> > RPC server.
>
> Right - the executor essentially maintains a context or contexts for
> the clients and executes code for the clients, and it reports back
> results including details of exceptions. Even the python command
> prompt is one of these things...
Of course, the Python prompt is the mother of all these. (That's why
I mentioned IDLE, since it tries to emulate the Python prompt -- only
better. :-)
--Guido van Rossum (home page: http://www.python.org/~guido/)