cc-4105: a whole bunch of docstrings were added

This commit is contained in:
Rudi Grinberg 2012-08-13 15:24:45 -04:00
parent 6238424113
commit 5d33ca7c6f
8 changed files with 57 additions and 7 deletions

View file

@ -15,9 +15,15 @@ class Loggable(object):
def logger(self): return logging.getLogger(appname)
def unexpected_exception(self,e):
"""
Default message for 'unexpected' exceptions
"""
self.fatal_exception("'Unexpected' exception has occured:", e)
def fatal_exception(self, message, e):
"""
Prints an exception 'e' with 'message'. Also outputs the traceback.
"""
self.logger.error( message )
self.logger.error( str(e) )
self.logger.error( traceback.format_exc() )