upstream fix, false err after listing imports

This commit is contained in:
Basile Burg 2016-11-10 13:48:32 +01:00
parent edad9efe4c
commit d7de93a500
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
3 changed files with 5 additions and 3 deletions

View File

@ -1319,10 +1319,10 @@ begin
LoadFromStream(proc.Stderr);
Insert(0, format('%s crashed with code: %d',
[shortenPath(proc.Executable), proc.ExitStatus]));
str += ReplaceStr(Text, #0, #10);
str += 'parameters:'#10;
str += proc.Parameters.Text;
str += 'stderr:'#10;
str += ReplaceStr(Text, #0, #10);
raise Exception.Create(str);
finally
free;

View File

@ -51,9 +51,9 @@ begin
prc.Input.Write(str[1], str.length);
prc.CloseInput;
processOutputToStrings(prc, imports);
while prc.Running do ;
// TODO-cmaintenance: remove this from version 3 gold
tryRaiseFromStdErr(prc);
while prc.Running do ;
finally
prc.free;
end;
@ -77,9 +77,9 @@ begin
prc.Execute;
prc.CloseInput;
processOutputToStrings(prc, results);
while prc.Running do ;
// TODO-cmaintenance: remove this from version 3 gold
tryRaiseFromStdErr(prc);
while prc.Running do ;
finally
prc.free;
end;

View File

@ -194,6 +194,7 @@ end;
function TLibraryItem.getModule(const value: string): TModuleInfo;
begin
//TODO-cFCL/LCL: use THashMap.GetValue from next FPC rlz
result := nil;
if fModulesByName.contains(value) then
exit(fModulesByName.GetData(value));
@ -429,6 +430,7 @@ end;
function TLibraryManager.getLibraryByAlias(const value: string): TLibraryItem;
begin
//TODO-cFCL/LCL: use THashMap.GetValue from next FPC rlz
result := nil;
if fItemsByAlias.contains(value) then
exit(fItemsByAlias.GetData(value));