Rainer von Saleski wrote:
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.
What you're seeing is the dialog box that the Delphi debugger displays when *any* exception occurs. Delphi is a debugger, and in Windows, a debugger gets to see exceptions *before* the program that's being debugged. Delphi shows you the dialog box and interrupts your program because it doesn't know what else will happen in your program.
After you dismiss the dialog, resume running your program and you should see that the exception does indeed get handled by your exception handler.
Delphi has some debugging options you can change to control how Delphi reacts to exceptions in your program.
Same problem with sample programs that use the "except on E: Exception do" construct. What am I missing?
-- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

