summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2017-09-10 16:41:17 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2017-09-11 17:13:21 -0700
commitde7e99f866e37c94dacdccd4c16dea4eabe2fdbb (patch)
tree5ae450c4b7722e0b9781727f1f7b12392c6aa5e1 /lib
parent32117c22deb97c0be06ef073c432e45569b138c3 (diff)
downloadspack-de7e99f866e37c94dacdccd4c16dea4eabe2fdbb.tar.gz
spack-de7e99f866e37c94dacdccd4c16dea4eabe2fdbb.tar.bz2
spack-de7e99f866e37c94dacdccd4c16dea4eabe2fdbb.tar.xz
spack-de7e99f866e37c94dacdccd4c16dea4eabe2fdbb.zip
Preserve original stack trace for UnsatisfiableSpecError
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index cd4922cf53..910788c81a 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2113,14 +2113,15 @@ class Spec(object):
fmt += 'while trying to concretize the partial spec:'
fmt += '\n\n{0}\n\n'.format(self.tree(indent=4))
fmt += '{0} requires {1} {2} {3}, but spec asked for {4}'
+
e.message = fmt.format(
self.name,
dep.name,
e.constraint_type,
e.required,
- e.provided
- )
- raise e
+ e.provided)
+
+ raise
# Add merged spec to my deps and recurse
dependency = spec_deps[dep.name]