_profile.py: Raise exception if invalid BST_PROFILE topic
Description
This is implemented with a new ProfileError, ensuring a user doesn't wait for a profile to complete that was never valid. This can guard against a user waiting for the output of a long profile (say, from a large bst build) only to receive no output due to a typo, or a non existent topic.
~/buildstream/doc/examples/autotools$ BST_PROFILE=invalid:scheduler:foo:invalid bst build hello.bst
Error loading user configuration: Provided BST_PROFILE topics do not exist: invalid, foo
As noted, tests cannot be added for this with the current PROFILER
implementation, but I'm unsure it's a worthy case.
Changes proposed in this merge request:
- Raise a handled exception during loading, presenting the user with the invalid profiles
This merge request, when approved, will close: #1208 (closed)
Edited by Tom Pollard