You've already forked lazarus-ccr
svn component: more verbose exception if svn command fails.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@443 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -78,6 +78,13 @@ var
|
|||||||
Result := true;
|
Result := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetOutput: string;
|
||||||
|
begin
|
||||||
|
SetLength(Result, Output.Size);
|
||||||
|
Output.Seek(0,soBeginning);
|
||||||
|
Output.Read(Result[1],Length(Result));
|
||||||
|
end;
|
||||||
begin
|
begin
|
||||||
if SvnExecutable='' then InitializeSvnExecutable;
|
if SvnExecutable='' then InitializeSvnExecutable;
|
||||||
|
|
||||||
@ -92,8 +99,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
ReadOutput;
|
ReadOutput;
|
||||||
Result := SvnProcess.ExitStatus;
|
Result := SvnProcess.ExitStatus;
|
||||||
if Result<>0 then
|
if Result<>0 then begin
|
||||||
Raise Exception.Create('svn ' + Command + ' failed.');
|
Raise Exception.CreateFmt(
|
||||||
|
'svn %s failed: Result %d' + LineEnding + '%s',
|
||||||
|
[Command, Result, GetOutput]);
|
||||||
|
end;
|
||||||
finally
|
finally
|
||||||
SvnProcess.Free;
|
SvnProcess.Free;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user