changeset 276:9bcfa4f81825

changes for error reporting complete
author catherine@cordelia
date Tue, 02 Jun 2009 07:34:15 -0400
parents f62e9fbb3f90
children b3702f5ed467
files cmd2.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Thu May 28 17:33:19 2009 -0400
+++ b/cmd2.py	Tue Jun 02 07:34:15 2009 -0400
@@ -274,7 +274,7 @@
         self.stdout.write(msg)
         if msg[-1] != '\n':
             self.stdout.write('\n')
-    def perror(self, errmsg):
+    def perror(self, errmsg, statement=None):
         print str(errmsg)
     def pfeedback(self, msg):
         """For printing nonessential feedback.  Can be silenced with `quiet`.
@@ -664,7 +664,7 @@
                 if self.timing:
                     self.pfeedback('Elapsed: %s' % str(datetime.datetime.now() - timestart))
             except Exception, e:
-                self.perror(e)
+                self.perror(e, statement)
         finally:
             if statekeeper:
                 if statement.parsed.output and not statement.parsed.outputTo: