#NEWLINE# def exception( self , * args , **kwargs ) : #NEWLINE# #INDENT# 'Works exactly like :meth:`error` just that the message\n        is optional and exception information is recorded.\n        ' #NEWLINE# if ( self . disabled or ( ERROR < self . level ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( not args ) : #NEWLINE# #INDENT# args = ( 'Uncaught exception occurred' , ) #NEWLINE# #UNINDENT# if ( 'exc_info' not in kwargs ) : #NEWLINE# #INDENT# exc_info = sys . exc_info ( ) #NEWLINE# assert ( exc_info [ 0 ] is not None ) , 'no exception occurred' #NEWLINE# kwargs . setdefault ( 'exc_info' , sys . exc_info ( ) ) #NEWLINE# #UNINDENT# return self . error ( * args , ** kwargs )