Pop return from stack?
carey.tilden at gmail.com
Mon Aug 16 06:01:04 CEST 2010
On Sun, Aug 15, 2010 at 6:43 PM, bvdp <bob at mellowood.ca> wrote:
> Not to belabor the point .. but "func" is not a standard lib module.
> It's part of a much larger application ... and in that application it
> makes perfect sense to terminate the application if it encounters an
> error. I fail to see the problem with this. Why would an APPLICATION
> raise a error or not exit to the system?
For me, the main reason is to ensure the application has only one exit
point. There's only one spot to maintain the code for closing files,
cleaning up network connections, displaying errors to the user, etc.
It makes it really easy to change your mind later about what to do
with errors. It also lets you unify handling of your own errors with
errors generated by 3rd party code.
More information about the Python-list