TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BART BROERSMA
from: BRYAN SMITH
date: 1997-03-25 16:15:00
subject: Trapping Exceptions from TMemo

On 23 Mar 97 Bart Broersma said to All...
 BB> How do I trap EInOutError exceptions when I use the
 BB> TMemo.Lines.LoadFromFile method ??
 BB> Any suggestions here ? I need to be able to know wether the
 BB> LoadFromFile or the SaveToFile has been succesfull.
Instead of trying to trap the exception, why not stop the problem before it
occurs ?  i.e., check for the presence of the file.
In Delphi 1, that would be ...
if FileSearch(f1Name,'') = '' then  { f1Name is name of file }
begin
  { handle problem of missing file }
end ;
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.