Odisseia 1.21.56
Português do BrasilManual oficial · 1.21.56
Sobre a tradução em inglês

TShell.RaiseOnNonZeroExit#

Define se um código de saída diferente de zero deve gerar EShellError.

Declaração#

property RaiseOnNonZeroExit: Boolean read write;

Exemplo#

program Example(Config: TConfig);

uses Odisseia.Process;
var Shell: TShell;
begin
  Shell := TShell.Create;
  Shell.Executable := Config.GetString('SHELL_EXECUTABLE');
  Shell.Command := 'echo hello';
  Shell.RaiseOnNonZeroExit := True;
  WriteLn(BoolToStr(Shell.RaiseOnNonZeroExit))
end.

Quando False, consulte TProcessResult.ExitCode ou Success para tratar o resultado.

Voltar para TShell