Improved "Execution of an external program failed" message.
This commit is contained in:
parent
0370dff8e0
commit
bb7604c06f
2 changed files with 7 additions and 5 deletions
|
|
@ -474,7 +474,7 @@ proc execWithEcho(cmd: string, msg = hintExecuting): int =
|
||||||
|
|
||||||
proc execExternalProgram*(cmd: string, msg = hintExecuting) =
|
proc execExternalProgram*(cmd: string, msg = hintExecuting) =
|
||||||
if execWithEcho(cmd, msg) != 0:
|
if execWithEcho(cmd, msg) != 0:
|
||||||
rawMessage(errExecutionOfProgramFailed, "")
|
rawMessage(errExecutionOfProgramFailed, cmd)
|
||||||
|
|
||||||
proc generateScript(projectFile: string, script: Rope) =
|
proc generateScript(projectFile: string, script: Rope) =
|
||||||
let (dir, name, ext) = splitFile(projectFile)
|
let (dir, name, ext) = splitFile(projectFile)
|
||||||
|
|
@ -680,7 +680,7 @@ proc callCCompiler*(projectfile: string) =
|
||||||
if gNumberOfProcessors <= 1:
|
if gNumberOfProcessors <= 1:
|
||||||
for i in countup(0, high(cmds)):
|
for i in countup(0, high(cmds)):
|
||||||
res = execWithEcho(cmds[i])
|
res = execWithEcho(cmds[i])
|
||||||
if res != 0: rawMessage(errExecutionOfProgramFailed, [])
|
if res != 0: rawMessage(errExecutionOfProgramFailed, cmds[i])
|
||||||
elif optListCmd in gGlobalOptions or gVerbosity > 1:
|
elif optListCmd in gGlobalOptions or gVerbosity > 1:
|
||||||
res = execProcesses(cmds, {poEchoCmd, poUsePath, poParentStreams},
|
res = execProcesses(cmds, {poEchoCmd, poUsePath, poParentStreams},
|
||||||
gNumberOfProcessors)
|
gNumberOfProcessors)
|
||||||
|
|
@ -692,9 +692,11 @@ proc callCCompiler*(projectfile: string) =
|
||||||
gNumberOfProcessors)
|
gNumberOfProcessors)
|
||||||
if res != 0:
|
if res != 0:
|
||||||
if gNumberOfProcessors <= 1:
|
if gNumberOfProcessors <= 1:
|
||||||
rawMessage(errExecutionOfProgramFailed, [])
|
rawMessage(errExecutionOfProgramFailed, cmds.join())
|
||||||
else:
|
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")
|
"rerun with --parallelBuild:1 to see the error message")
|
||||||
if optNoLinking notin gGlobalOptions:
|
if optNoLinking notin gGlobalOptions:
|
||||||
# call the linker:
|
# call the linker:
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ const
|
||||||
errUseQualifier: "ambiguous identifier: \'$1\' -- use a qualifier",
|
errUseQualifier: "ambiguous identifier: \'$1\' -- use a qualifier",
|
||||||
errTypeExpected: "type expected",
|
errTypeExpected: "type expected",
|
||||||
errSystemNeeds: "system module needs \'$1\'",
|
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",
|
errNotOverloadable: "overloaded \'$1\' leads to ambiguous calls",
|
||||||
errInvalidArgForX: "invalid argument for \'$1\'",
|
errInvalidArgForX: "invalid argument for \'$1\'",
|
||||||
errStmtHasNoEffect: "statement has no effect",
|
errStmtHasNoEffect: "statement has no effect",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue