class_docstr: Unit tests for the nupic.support.decorators module.
class_docstr_tok: ["Unit","tests","for","the","nupic.support.decorators","module","."]
code: def testLogExceptionsWithRuntimeErrorExceptionAndCustomLogger(self):
      loggerMock = Mock(spec_set=decorators.logging.getLogger())
  
      @decorators.logExceptions(loggerMock)
      def doSomething(*args, **kwargs):
          self.assertEqual(args, inputArgs)
          self.assertEqual(kwargs, inputKwargs)
  
          raise RuntimeError()
  
      inputArgs = (1, 2, 3)
      inputKwargs = dict(a="A", b="B", c="C")
  
      with self.assertRaises(RuntimeError):
          doSomething(*inputArgs, **inputKwargs)
  
      self.assertEqual(loggerMock.exception.call_count, 1)
      self.assertIn(
          "Unhandled exception %r from %r. Caller stack:\n%s",
          loggerMock.exception.call_args[0][0],
      )
  
imports: from mock import patch, call, Mock
  from nupic.support.unittesthelpers.testcasebase import unittest
  from nupic.support import decorators
label_desc: Use image node_id 3 for calling the LogExceptionsTestCase obj's underlying member method code with example usage: obj.testLogExceptionsWithRuntimeErrorExceptionAndCustomLogger() without return types