fpc/tests/webtbs/tw0803.pp
2000-11-30 22:38:14 +00:00

18 lines
272 B
ObjectPascal

{$MODE objfpc}
program FileExc;
uses SysUtils, Classes;
var
f: TFileStream;
begin
try
f := TFileStream.Create('a nonexistent file', fmOpenRead);
except
on e: Exception do begin
f.Free;
halt(0);
end;
end;
writeln('Error');
halt(1);
end.