Re: Tasty exceptions



Michael C. wrote:

First of all, if you are concerned with "Flow of Control",
you don't really need to put exception handlers all over the place.
Why? Because you aren't throwing exceptions in the first place.

Nonsense. Exceptions are designed for flow control and they do it
quite well, if used correctly. The general case (speaking very broadly;
there are, well, exceptions) is that when you get an exception whatever
you are doing should stop.

So the majority of the time you don't write exception handlers
outside of Application.OnException?

Yes. I use try/finally often, try/except with re-raising the exception
infrequently, and try/except without re-raising the exception extremely
rarely.

--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
http://blogs.teamb.com/craigstuntz/articles/403.aspx
.