Rainer,
Not sure there is a Delphi 7.1. I tested your code with Delphi 7.0 (Build
8.1) and it works correctly except that the exception name raised by
StrToInt is EConvertError not EConvertErr but I figured that was just a typo
in your e-mail since could does not even compile.


----- Original Message ----- 
From: "Rainer von Saleski" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, June 13, 2005 1:07 PM
Subject: Fw: Exceptions in Delphi 7.1


I don't seem to be able to get my programs to handle exceptions ... at all!
Even something as simple as

try
  I := strtoint ('WRONG');
  ShowMessage ('This should never print, but it does');
except
  on EConvertErr do
    ShowMessage ('Not right');
  else
    ShowMessage ('That is wrong');
end;

doesn't trap the error -- I just get a nasty exception box.

Same problem with sample programs that use the "except on E: Exception do"
construct.

What am I missing?

Thanks,
Rainer
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to