On Thu, 29 Apr 2021, James Richters via fpc-pascal wrote:

I’m trying to put the Ini file stuff all in it’s own unit.

My unit is {$Mode OBJFPC}
and Uses IniFiles;

“Try”  is compiling, but I’m getting Error: Identifier not found “EFOpenError”

And also Syntax error “Do” expected but “)” found

I have:

try
 Log_ini := TIniFile.Create('myini.ini');
except
 on e: EFOpenError do      // Identifier not found “EFOPenError”
   Writeln(EFOpenError);
 on e: Exception do
   Writeln(Exception);
end;

Do I need some other unit for EFOpenError to work?

Best add SysUtils and Classes.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to