summaryrefslogtreecommitdiff
path: root/buildstream/_project.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-08 21:42:27 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-08 21:57:01 +0900
commit96af6dd5ae9743c7405cbfd99c929701c023f3e5 (patch)
treeaef3a4e56a52196576502cfa04e87a31216d74f2 /buildstream/_project.py
parent337b7a31c244241f722a5ff709d23df75a021eb9 (diff)
downloadbuildstream-96af6dd5ae9743c7405cbfd99c929701c023f3e5.tar.gz
More specific exceptions when a project.conf is missing.
Since we want to react and start an interactive session when the project.conf is missing, we need a more specific error to catch.
Diffstat (limited to 'buildstream/_project.py')
-rw-r--r--buildstream/_project.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py
index c7f535e23..e71bdf0f1 100644
--- a/buildstream/_project.py
+++ b/buildstream/_project.py
@@ -214,7 +214,12 @@ class Project():
config = _yaml.load(_site.default_project_config)
# Load project local config and override the builtin
- project_conf = _yaml.load(projectfile)
+ try:
+ project_conf = _yaml.load(projectfile)
+ except LoadError as e:
+ # Raise a more specific error here
+ raise LoadError(LoadErrorReason.MISSING_PROJECT_CONF, str(e))
+
_yaml.composite(config, project_conf)
# Element and Source type configurations will be composited later onto