| Index: tools/gn/import_manager.cc
|
| diff --git a/tools/gn/import_manager.cc b/tools/gn/import_manager.cc
|
| index 8c57008a339168739a4f4027475cfa3a1f14fa78..86cfd458a9cbb619a394a35b4ddc54e30736d9ee 100644
|
| --- a/tools/gn/import_manager.cc
|
| +++ b/tools/gn/import_manager.cc
|
| @@ -30,8 +30,12 @@ std::unique_ptr<Scope> UncachedImport(const Settings* settings,
|
|
|
| scope->SetProcessingImport();
|
| node->Execute(scope.get(), err);
|
| - if (err->has_error())
|
| + if (err->has_error()) {
|
| + // If there was an error, append the caller location so the error message
|
| + // displays a why the file was imported (esp. useful for failed asserts).
|
| + err->AppendSubErr(Err(node_for_err, "whence it was imported."));
|
| return nullptr;
|
| + }
|
| scope->ClearProcessingImport();
|
|
|
| return scope;
|
|
|