diff options
| author | Nick Lewycky <nlewycky@google.com> | 2016-06-22 13:57:25 -0700 |
|---|---|---|
| committer | Nick Lewycky <nlewycky@google.com> | 2016-06-22 14:19:11 -0700 |
| commit | 067e9f19e2e129fe377b9519bb6d574f3ecd56d5 (patch) | |
| tree | 38ab2991f021860f33ffde2f879ddabf4d58b5dc | |
| parent | 52fe6fcb7e0143e48b8f82f92283dea89e5c3741 (diff) | |
Turn CHECK failure that depends on file system state into an error message
and include what failed in the error.
| -rw-r--r-- | eval.cc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -230,7 +230,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())); |
