More verbose User/UsageError reporting in be-handle-mail
authorW. Trevor King <wking@drexel.edu>
Sun, 19 Jul 2009 20:10:57 +0000 (16:10 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 19 Jul 2009 20:10:57 +0000 (16:10 -0400)
interfaces/email/interactive/be-handle-mail

index 590824a7cc130f33a39482dfc3484de36c84c165..1feba92c6c05e32f5c6ab2c17e604ba4bafd0e8b 100755 (executable)
@@ -218,9 +218,11 @@ class Command (object):
         except libbe.cmdutil.GetCompletions:
             self.err = InvalidOption(self.msg, self.command, u"--complete")
         except libbe.cmdutil.UsageError, e:
-            self.err = InvalidCommand(self.msg, self, type(e))
+            self.err = InvalidCommand(self.msg, self,
+                                      "%s\n%s" % (type(e), unicode(e)))
         except libbe.cmdutil.UserError, e:
-            self.err = InvalidCommand(self.msg, self, type(e))
+            self.err = InvalidCommand(self.msg, self,
+                                      "%s\n%s" % (type(e), unicode(e)))
         # restore stdin, stdout, and stderr
         if self.stdin != None:
             sys.__stdin__ = new_stdin