gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] catching errors in an app


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] catching errors in an app
Date: Wed, 25 Jan 2006 17:33:31 +0100
User-agent: Mutt/1.5.11

On Wed, Jan 25, 2006 at 08:41:19AM +1100, Richard wrote:

> I guess this is well implemented in gnumed.
Unfortunately not. There was talk about how to improve it
fairly recently on the list.

> Karsten I wonder if you could point me in a direction.
We got a "top level" exception handler in client/gnumed.py
which wraps the entire client.

However, wxPython catches exceptions inside it's event
handler AFAIK and they never propagate beyond that. I am not
aware of a way to control this. If someone can shed light on
this issue I'd be glad.

OTOH we also have a bit of somewhat generic error handling
in pycommon/gmBusinessDBObject.py but this only applies to
its sublcasses.

We also have gmGuiHelpers.gm_show_error() and friends to
ease notification about errors.

> Do have a global error catching module, or specific error
> routines for earch subroutine.
Well, each error that can be usefully handled needs to be
handled where it occurs. Other errors should throw
exceptions as we agreed. However, it is at times a very hard
decision which errors can be handled and which cannot be
handled. It is also sometimes not in the power of the called
subroutine to even theoretically *have* that knowledge.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]