Commit 036056ae authored by Joseph Weston's avatar Joseph Weston
Browse files

builder.fill: correctly re-raise error using 'raise ... from ...'

This is the standard way to re-raise errors and makes the messages
easier to follow.
parent 3a02cc2f
......@@ -1436,9 +1436,9 @@ class Builder:
self.H = {}
# Re-raise the exception with an additional message.
msg = ("All sites of this builder have been deleted because an "
"exception\noccurred during the execution of fill():")
e.args = ('\n'.join((msg,) + e.args),)
"exception\noccurred during the execution of fill(): "
"see above.")
raise RuntimeError(msg) from e
return done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment