On 10/13/16, Michael Van Canneyt <mich...@freepascal.org> wrote: > Call Terminate and exit properly ? > TCustomApplication has an exitcode property which will set the global exit > code.
AFAICS not in fpc 3.0.0 (TATCApp = class(TCustomApplication) procedure TATCApp.OnExcept(Sender: TObject; E: Exception); begin writeln(Format('An exception has occurred of type %s, with message:',[E.ClassName])); writeln(Format('"%s"',[E.Message])); writeln('The program will be termminated immediately.'); if (E is EInOutError) then Self.ExitCode := EInOutError(E).ErrorCode; end; air2.lpr(54,35) Error: identifier idents no member "ExitCode" Probably you can set system.ExitCode before calling Terminate. Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal