MG: reduced exceptions on file not found

git-svn-id: trunk@3494 -
This commit is contained in:
lazarus 2002-10-09 12:40:25 +00:00
parent 3664a61eab
commit 3c97241416

View File

@ -278,18 +278,20 @@ begin
end; end;
doc:=nil; doc:=nil;
MemStream:=TMemoryStream.Create; if FileExists(AFilename) then begin
try MemStream:=TMemoryStream.Create;
try try
ok:=false; try
MemStream.LoadFromFile(AFilename); ok:=false;
ok:=true; MemStream.LoadFromFile(AFilename);
except ok:=true;
except
end;
if ok then
ReadXMLFile(doc,MemStream);
finally
MemStream.Free;
end; end;
if ok then
ReadXMLFile(doc,MemStream);
finally
MemStream.Free;
end; end;
if not Assigned(doc) then if not Assigned(doc) then
@ -307,6 +309,9 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.6 2002/10/09 12:40:25 lazarus
MG: reduced exceptions on file not found
Revision 1.5 2002/10/01 09:09:07 lazarus Revision 1.5 2002/10/01 09:09:07 lazarus
MG: added clear and deletepath MG: added clear and deletepath