exceptions == errors?
mh at pixar.com
Tue Apr 8 01:47:59 CEST 2003
Are exceptions always considered errors, or there the same feeling
as in C++ that exceptions can be used for non-error situations?
I am asking because I am writing a network server that has the
So, I have the option to
1. embed the "send response" code in the request processing code
2. Have the request processing code generate formatted responses
that are returned to the main loop
As is usually the case, adding robust error checking and reporting
throws a kink into the works. I have to do a lot of exception
wrapping in the request processing code in order to ensure that
there are no code paths where an exception short-circuits a
Therefore, I'm thinking of structuring the code like this:
send response contained in e
send "internal error" response
Am I setting myself up for trouble if I follow this route?
All advice gratefully received.
Pixar Animation Studios
More information about the Python-list