summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_loader/loader.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py
index 9b91e91fe..f7fd3203e 100644
--- a/buildstream/_loader/loader.py
+++ b/buildstream/_loader/loader.py
@@ -570,10 +570,14 @@ class Loader():
parent_loader=self)
except LoadError as e:
if e.reason == LoadErrorReason.MISSING_PROJECT_CONF:
+ message = (
+ "Could not find the project.conf file in the project "
+ "referred to by junction element '{}'.".format(element.name)
+ )
+ if element.path:
+ message += " Was expecting it at path '{}' in the junction's source.".format(element.path)
raise LoadError(reason=LoadErrorReason.INVALID_JUNCTION,
- message="Could not find the project.conf file for {}. "
- "Expecting a project at path '{}'"
- .format(element, element.path or '.')) from e
+ message=message) from e
else:
raise