# HG changeset patch # User Paul Boddie # Date 1491171167 -7200 # Node ID ea84f496b3f687c77aaf9667469d17a97e7688d6 # Parent 345fe332fcf1d931050164b450150f540e0f17a4 Added the string representation of the node at which a NodeProcessingError occurs to the string representation of the error. diff -r 345fe332fcf1 -r ea84f496b3f6 errors.py --- a/errors.py Fri Mar 31 23:27:55 2017 +0200 +++ b/errors.py Mon Apr 03 00:12:47 2017 +0200 @@ -70,7 +70,9 @@ def __str__(self): lineno = self.get_lineno(self.astnode) - return "Error in %s%s: %s" % (self.unit_name, lineno and (" at line %s" % lineno) or "", self.message) + return "Error in %s%s: %s%s" % ( + self.unit_name, lineno and (" at line %s" % lineno) or "", + self.message, self.astnode and "\n\n%s" % self.astnode or "") class InspectError(NodeProcessingError):