Link to home
Start Free TrialLog in
Avatar of qas
qas

asked on

try... except...

Hello!

What am I doing wrong ?

I want to intercept an exception without getting it to pop out.  Here a sample code:

try
max := 0;
temp := FloatToStr(100 / max);
except
  showmessage('error');
end;

Here, I want to get the showmessage BUT NOT the Delphi error of division by 0.  I know it sounds stupid, but now I get both!

Any hint ??
Thanks!!
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qas
qas

ASKER

Thanks alot!!