diff options
| author | Dan Willemsen <dan@danw.org> | 2016-10-17 15:51:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-17 15:51:25 -0700 |
| commit | 896c7ff8793cc6da3a9feb09028c2c189bfb3da8 (patch) | |
| tree | 03688e2b38bcef88022fb617f1075cfef0968e85 | |
| parent | cb717b8ccc234b8ae318a8278f29ee075390e7c9 (diff) | |
| parent | f8dad36a5330f05c01f91501464976acb42631a3 (diff) | |
Merge pull request #87 from nlewycky/master
Include details in error message
| -rw-r--r-- | eval.cc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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))); } } |
