[fpc-pascal] Detecting IO errors with INI file

James Richters james.richters at productionautomation.net
Thu Apr 29 11:39:54 CEST 2021


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?
 
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210429/62e34109/attachment-0001.htm>


More information about the fpc-pascal mailing list