##// END OF EJS Templates
ui: add 'force' parameter to traceback() to override the current print setting...
Matt Harbison -
r18966:5572f688 default
parent child Browse files
Show More
@@ -681,11 +681,11 b' class ui(object):'
681
681
682 return t
682 return t
683
683
684 def traceback(self, exc=None):
684 def traceback(self, exc=None, force=False):
685 '''print exception traceback if traceback printing enabled.
685 '''print exception traceback if traceback printing enabled or forced.
686 only to call in exception handler. returns true if traceback
686 only to call in exception handler. returns true if traceback
687 printed.'''
687 printed.'''
688 if self.tracebackflag:
688 if self.tracebackflag or force:
689 if exc is None:
689 if exc is None:
690 exc = sys.exc_info()
690 exc = sys.exc_info()
691 cause = getattr(exc[1], 'cause', None)
691 cause = getattr(exc[1], 'cause', None)
@@ -703,7 +703,7 b' class ui(object):'
703 else:
703 else:
704 traceback.print_exception(exc[0], exc[1], exc[2],
704 traceback.print_exception(exc[0], exc[1], exc[2],
705 file=self.ferr)
705 file=self.ferr)
706 return self.tracebackflag
706 return self.tracebackflag or force
707
707
708 def geteditor(self):
708 def geteditor(self):
709 '''return editor to use'''
709 '''return editor to use'''
General Comments 0
You need to be logged in to leave comments. Login now