# HG changeset patch # User Ludovic Chabant # Date 1408406006 25200 # Node ID 0170f449f924c651a188108f491ec557ab7ca5b7 # Parent de6a296744f77c589f476b5a37fbc52987268642 Slightly better exception throwing in the processing pipeline. diff -r de6a296744f7 -r 0170f449f924 piecrust/processing/tree.py --- a/piecrust/processing/tree.py Mon Aug 18 16:53:08 2014 -0700 +++ b/piecrust/processing/tree.py Mon Aug 18 16:53:26 2014 -0700 @@ -148,9 +148,7 @@ print_node(format_timed(start_time, "(bypassing structured processing)")) return True except Exception as e: - import sys - _, __, traceback = sys.exc_info() - raise Exception("Error processing: %s" % node.path, e).with_traceback(traceback) + raise Exception("Error processing: %s" % node.path) from e # All outputs of a node must go to the same directory, so we can get # the output directory off of the first output. @@ -178,9 +176,7 @@ print_node(node, "-> %s [clean]" % out_dir) return False except Exception as e: - import sys - _, __, traceback = sys.exc_info() - raise Exception("Error processing: %s" % node.path, e).with_traceback(traceback) + raise Exception("Error processing: %s" % node.path) from e def _computeNodeState(self, node): if node.state != STATE_UNKNOWN: