Preserve original stack trace for UnsatisfiableSpecError

This commit is contained in:
Todd Gamblin 2017-09-10 16:41:17 -07:00
parent 32117c22de
commit de7e99f866

View file

@ -2113,14 +2113,15 @@ def _merge_dependency(self, dep, deptypes, visited, spec_deps,
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]