[Top][All Lists]
[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: |
Thu, 16 Feb 2006 20:46:42 +0100 |
User-agent: |
Mutt/1.5.11+cvs20060126 |
On Fri, Jan 27, 2006 at 10:55:11AM +0800, address@hidden wrote:
> Like Karsten I believe the backend is the best/easiest place to do this.
Best: well, sort of, the most imporatant, I'd say.
Easiest: I don't know about that ...
However, *not* doing the best you can in data validation at
the lowest possible API (eg at the schema level) is like
trying to win a soccer game with a lousy goalkeeper.
> gnumed's current problem is propagating these errors back to be user
> in a nice way is harder than it should be.
Let's improve that when we start requiring PG 8.1, that is
when 8.1 is standard on current distributions.
> > This also raises the question of allowing multi-line text inputs in say the
> > street field I guess.
> No, street names are street names - one line.
Ha ! Do you think we should add check constraints on some
such fields ? IOW "unlimited" length is fine but no CR/LF/FF ?
If so I'll go ahead and add them ...
> The problem is in Python, everything is an exception, even syntax errors,
> which are silently gobbled by the wxPython core, unless you provide
> an exception handler.
No, the problem is NOT that you must provide an exception
handler. The problem is that you have to provide a gazillion
exception handlers - one in each and every event handler.
> Personally want I'd like to see is a single generic handler at the top
> of the stack (so called from the GUI event handler) which writes to the log
> and presents a sensible dialog box to the user. 99.99% of the time this is
> the
> only sensible thing to do anyway, this simplifies the rest of the code
> massively.
That'd be immensly great !
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
- Re: [Gnumed-devel] catching errors in an app,
Karsten Hilbert <=