Re: Practical error/exception handling...
From: J West (jimw_at_fluffypaws.co.uk)
Date: 01/21/05
- Next message: Terry Russell: "Re: Unsharp/Old/Vague Monitor causes Tired eyes ;)"
- Previous message: Raptor: "Re: Practical error/exception handling..."
- In reply to: Raptor: "Re: Practical error/exception handling..."
- Next in thread: Raptor: "Re: Practical error/exception handling..."
- Reply: Raptor: "Re: Practical error/exception handling..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 21 Jan 2005 01:50:46 -0000
"Raptor" <bogus@none.com> wrote in message
news:cspkf305b3@news2.newsguy.com...
>
> J West <jimw@fluffypaws.co.uk> wrote in message
> news:ffCdndS4S8Vos23cRVnyvw@pipex.net...
>> Hhmmmmm!
>> What a lot of heat in this post!
>> Could I humbly suggest that the requirement for a 'standard' way of
> handling
>> exceptions be iterated in order to get a better response.
>
> And reiterated.
>
>> i.e. state the problem rather than ask how to make the solution work!
>>
>> Anyway.
>
> A problem well-stated is often well over half-solved. A corollary is that
> people who don't understand something are often unsure how to frame the
> question.
>
>
>> What I have done in the past is to have a database table of error codes
> for
>> specific actions that I need to check for.
>> e.g. When doing complicated updates that involve many tables (More than
>> one!) then I define an error code for successfull update and I raise the
>> error to a global error handling routine that can roll back transactions
> and
>> raise a standard message (That I can change without re-compile by
>> updating
>> the database) via a specially defined dialogue to tell the user that
>> their
>> data didn't save and to please report this message to me so I can
>> rectify/investigate the problem. But I only need the exception handler in
>> one save button click event handler because all my forms that save data
> are
>> descendants of this form.
>>
>> You see it's all in the design of the application as to how RAD and
>> ROBUST
>> your application really is.
>>
>> Good luck
>
> So descendantship is one way to centralize error trapping code. That and a
> list of anticipated problems.
That's one way of looking at it! (What the BLEEP am I doing replying to
posts at this time in the morning? :-})
As already pointed out by yourself and others both directly and indirectly,
you do not need to handle all exceptions these day's. Why bother trying to
deal with a missing network connection or a file being locked when these
errors are handled for you by Delphi! It is only actions that you deem to be
"Critical" that need really tight exception handling.
Wouldn't it be nice if compilers could automatically decide if something is
critical to you or not?
Oh well I guess that's why there are still programmers! Roll on neural
networks then we wouldn't have anything to do at all!
Sorry being flippant! Think it must be that time in the morning combined
with my utter frustration with TWebBrowser refusing to completely download a
web page unless it is actually visible on a form.
Sigh!
Goodnight!
James West
- Next message: Terry Russell: "Re: Unsharp/Old/Vague Monitor causes Tired eyes ;)"
- Previous message: Raptor: "Re: Practical error/exception handling..."
- In reply to: Raptor: "Re: Practical error/exception handling..."
- Next in thread: Raptor: "Re: Practical error/exception handling..."
- Reply: Raptor: "Re: Practical error/exception handling..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]