* Print the exit code of the builder.

This commit is contained in:
Eelco Dolstra 2003-11-01 21:11:52 +00:00
parent 1610444671
commit 7de1b2a698
2 changed files with 10 additions and 3 deletions

View file

@ -251,7 +251,6 @@ void Database::close()
for (map<TableId, Db *>::iterator i = tables.begin(); for (map<TableId, Db *>::iterator i = tables.begin();
i != tables.end(); i++) i != tables.end(); i++)
{ {
debug(format("closing table %1%") % i->first);
Db * db = i->second; Db * db = i->second;
db->close(DB_NOSYNC); db->close(DB_NOSYNC);
delete db; delete db;

View file

@ -111,9 +111,17 @@ void runProgram(const string & program,
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
if (keepFailed) { if (keepFailed) {
msg(lvlTalkative, msg(lvlTalkative,
format("build failed; keeping build directory `%1%'") % tmpDir); format("program `%1%' failed; keeping build directory `%2%'")
% program % tmpDir);
delTmpDir.cancel(); delTmpDir.cancel();
} }
throw Error("unable to build package"); if (WIFEXITED(status))
throw Error(format("program `%1%' failed with exit code %2%")
% program % WEXITSTATUS(status));
else if (WIFSIGNALED(status))
throw Error(format("program `%1%' failed due to signal %2%")
% program % WTERMSIG(status));
else
throw Error(format("program `%1%' died abnormally") % program);
} }
} }