Recent

Author Topic: Except and Exceptions  (Read 4266 times)

Zaher

  • Hero Member
  • *****
  • Posts: 683
    • parmaja.org
Except and Exceptions
« on: July 16, 2007, 07:42:53 pm »
As i think in Delphi when i use "except' that mean i ignore the exception
for example where i have the problem
Code: [Select]

procedure TmposSession.SafeFetch(Command:string; Items: TmposProfile; Cache:Boolean);
begin
  try
    Fetch(Command, Items);
    if Cache then
      Items.SaveToFile(GetCacheFolder + Command+'.xml');
  except
    if Cache then
      Items.LoadFromFile(GetCacheFolder + Command+'.xml');
  end;
end;


When Fetch function fail and raise an exception, it must load it from the file.
but when use SafeFetch in a form create, the form not created because there is an exception.
I feel i am wrong in some where :)

Zaher

  • Hero Member
  • *****
  • Posts: 683
    • parmaja.org
RE: Except and Exceptions
« Reply #1 on: July 16, 2007, 08:25:15 pm »
Ok never mind, stupid me, it is fail because the xml file not found :P

 

TinyPortal © 2005-2018