Pedro Vale de Gato wrote:
> Hi Paul,
> 
> I have to agree with you, it also bothers me to just log, but i really 
> think raising the exception as a default is bad for dabo, i already have 
> the handling code you suggest in my apps, i think we have two choices:
> 
> - write a log error
> - raise an exception, but have a default handler for that exception that 
> informs the user about the problem

Informing the user, like with a messagebox? We already do that in other places 
and it 
results in code that is very hard to debug (because no exception propagates up 
so 
there's no traceback).

If we were to put that in by default, then for every listbox I define I'd need 
to 
remember to override that default, and before I even realized that overriding 
it was 
necessary.

I think the best default action for any exceptional condition is to raise an 
exception.


> In the "raise an exception, and hope for someone to catch it" scenario, 
> an unxeperient coder (i'm quite new to dabo, so maybe i'm one of those) 
> will only detect this problem when it may already be too late, thus 
> giving dabo a bad image...

Would killing the app with sys.exit() after any exception solve this issue do 
you 
think? That way, there aren't any partially filled forms, etc.


> Maybe  we should go with the second one, have a default exception handler?

I really don't think so. There are many reasons why a Value might not be in the 
Keys, 
and I'd guess that most of them have nothing to do with the end-user.

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to