mirror of https://gitlab.com/basile.b/dexed.git
allow to check StdErr content at debug time
This commit is contained in:
parent
6ed96833c7
commit
5d84f67e46
|
@ -1324,14 +1324,17 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tryRaiseFromStdErr(proc: TProcess);
|
procedure tryRaiseFromStdErr(proc: TProcess);
|
||||||
|
var
|
||||||
|
str: string;
|
||||||
begin
|
begin
|
||||||
if (proc.ExitStatus <> 0) and (poUsePipes in proc.Options) then
|
if (proc.ExitStatus <> 0) and (poUsePipes in proc.Options) and not
|
||||||
with TStringList.Create do
|
(poStderrToOutPut in proc.Options) then with TStringList.Create do
|
||||||
try
|
try
|
||||||
LoadFromStream(proc.Stderr);
|
LoadFromStream(proc.Stderr);
|
||||||
Insert(0, format('tool crashed with code: %d (%s)',
|
Insert(0, format('%s crashed with code: %d',
|
||||||
[proc.ExitStatus, shortenPath(proc.Executable)]));
|
[shortenPath(proc.Executable), proc.ExitStatus]));
|
||||||
raise Exception.Create(Text);
|
str := Text;
|
||||||
|
raise Exception.Create(str);
|
||||||
finally
|
finally
|
||||||
free;
|
free;
|
||||||
end;
|
end;
|
||||||
|
@ -1344,7 +1347,7 @@ begin
|
||||||
for i := strings.Count-1 downto 0 do
|
for i := strings.Count-1 downto 0 do
|
||||||
begin
|
begin
|
||||||
j := strings.IndexOf(strings[i]);
|
j := strings.IndexOf(strings[i]);
|
||||||
if (j <> -1) and (j <> i) then
|
if (j <> -1) and (j < i) then
|
||||||
strings.Delete(i);
|
strings.Delete(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue