Re: Tasty exceptions



Michael C. wrote:

I was under the impression that some people here believed using a
generic try-except-end statement was a very bad idea.

Well, to be clear, this example which you posted is IMHO a very bad
idea, for reasons I explain elsewhere in this thread:

Function TrySomething : boolean;
begin
result := false;

Try
SomeCallThatMightProduceAnException;

// ...

result := true;
Except
end;
end;

I hope that removes the ambiguity.

--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Borland newsgroup denizen Sergio González has a new CD of
Irish music out, and it's good: http://tinyurl.com/7hgfr
.



Relevant Pages

  • Re: CG revenues have dropped!
    ... Michael C. wrote: ... but he was posting under different names then. ... Delphi/InterBase Weblog: http://blogs.teamb.com/craigstuntz ... Useful articles about InterBase development: ...
    (borland.public.delphi.non-technical)
  • Re: A most complete book on OOP concepts
    ... Michael C. wrote: ... Delphi/InterBase Weblog: http://blogs.teamb.com/craigstuntz ... Useful articles about InterBase development: ...
    (borland.public.delphi.non-technical)