Improved "Execution of an external program failed" message.

This commit is contained in:
Dominik Picheta
2015-09-27 14:18:03 +01:00
parent 0370dff8e0
commit bb7604c06f
2 changed files with 7 additions and 5 deletions

View File

@@ -474,7 +474,7 @@ proc execWithEcho(cmd: string, msg = hintExecuting): int =
proc execExternalProgram*(cmd: string, msg = hintExecuting) =
if execWithEcho(cmd, msg) != 0:
rawMessage(errExecutionOfProgramFailed, "")
rawMessage(errExecutionOfProgramFailed, cmd)
proc generateScript(projectFile: string, script: Rope) =
let (dir, name, ext) = splitFile(projectFile)
@@ -680,7 +680,7 @@ proc callCCompiler*(projectfile: string) =
if gNumberOfProcessors <= 1:
for i in countup(0, high(cmds)):
res = execWithEcho(cmds[i])
if res != 0: rawMessage(errExecutionOfProgramFailed, [])
if res != 0: rawMessage(errExecutionOfProgramFailed, cmds[i])
elif optListCmd in gGlobalOptions or gVerbosity > 1:
res = execProcesses(cmds, {poEchoCmd, poUsePath, poParentStreams},
gNumberOfProcessors)
@@ -692,9 +692,11 @@ proc callCCompiler*(projectfile: string) =
gNumberOfProcessors)
if res != 0:
if gNumberOfProcessors <= 1:
rawMessage(errExecutionOfProgramFailed, [])
rawMessage(errExecutionOfProgramFailed, cmds.join())
else:
rawMessage(errGenerated, " execution of an external program failed; " &
rawMessage(errGenerated,
" execution of an external compiler program failed: " &
cmds.join() & "; " &
"rerun with --parallelBuild:1 to see the error message")
if optNoLinking notin gGlobalOptions:
# call the linker:

View File

@@ -203,7 +203,7 @@ const
errUseQualifier: "ambiguous identifier: \'$1\' -- use a qualifier",
errTypeExpected: "type expected",
errSystemNeeds: "system module needs \'$1\'",
errExecutionOfProgramFailed: "execution of an external program failed",
errExecutionOfProgramFailed: "execution of an external program failed: '$1'",
errNotOverloadable: "overloaded \'$1\' leads to ambiguous calls",
errInvalidArgForX: "invalid argument for \'$1\'",
errStmtHasNoEffect: "statement has no effect",