aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dan@danw.org>2016-10-17 15:51:25 -0700
committerGitHub <noreply@github.com>2016-10-17 15:51:25 -0700
commit896c7ff8793cc6da3a9feb09028c2c189bfb3da8 (patch)
tree03688e2b38bcef88022fb617f1075cfef0968e85
parentcb717b8ccc234b8ae318a8278f29ee075390e7c9 (diff)
parentf8dad36a5330f05c01f91501464976acb42631a3 (diff)
Merge pull request #87 from nlewycky/master
Include details in error message
-rw-r--r--eval.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/eval.cc b/eval.cc
index 115d3dd..4b56f1f 100644
--- a/eval.cc
+++ b/eval.cc
@@ -276,7 +276,9 @@ void Evaluator::EvalIf(const IfStmt* stmt) {
void Evaluator::DoInclude(const string& fname) {
Makefile* mk = MakefileCacheManager::Get()->ReadMakefile(fname);
- CHECK(mk->Exists());
+ if (!mk->Exists()) {
+ Error(StringPrintf("%s does not exist", fname.c_str()));
+ }
Var* var_list = LookupVar(Intern("MAKEFILE_LIST"));
var_list->AppendVar(this, NewLiteral(Intern(TrimLeadingCurdir(fname)).str()));
@@ -298,7 +300,7 @@ void Evaluator::EvalInclude(const IncludeStmt* stmt) {
if (stmt->should_exist) {
if (files->empty()) {
- // TOOD: Kati does not support building a missing include file.
+ // TODO: Kati does not support building a missing include file.
Error(StringPrintf("%s: %s", pat.data(), strerror(errno)));
}
}