diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-25 17:06:30 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-25 17:06:30 +0100 |
commit | f1409e9fe46cc68b8ff4f7c9a8fc6d8ecb11225c (patch) | |
tree | 664b08520b5b6892532ce42077b76e5699235aff /tests.branching/show-system-branch-fails-when-branch-is-ambiguous.script | |
parent | 554391c3df84e9df6565317b1d6725e536569297 (diff) | |
download | morph-f1409e9fe46cc68b8ff4f7c9a8fc6d8ecb11225c.tar.gz |
Replace AutodetectError with MorphologyNotFoundError
The error message:
ERROR: Failed to determine the build system of repo file://foo/bar/baz at
ref 59713cf997385a094091443fdcce9d5c17313f39: was looking for
distbuild-system-x86-64.morph
is confusing since our system morph has nothing to do with build systems,
the fact that build system autodetection is executed when looking for
distbuild-system-x86-64.morph is an implementation detail that shouldn't be
exposed to the user.
This patch replaces this error message with:
ERROR: Couldn't find morphology: distbuild-system-x86-64.morph
This is still not ideal, since there are cases where we may not be able
find the morph because build system autodection has failed, but out of the
two user typos/mistakes are probably more likely.
Differentiating between user error and build system detection failure would
require more substantial changes.
This patch also splits the get_morphology function into two functions
_get_morphology_text, that actually fetches the morph text from the cache
or otherwise infers it from the build system,
and get_morphology which constructs a Morphology object from the text.
Diffstat (limited to 'tests.branching/show-system-branch-fails-when-branch-is-ambiguous.script')
0 files changed, 0 insertions, 0 deletions