message: We now also log the exception which is thrown while running the session.
diff: @@ -866,6 +866,18 @@ def device(use_gpu):
  yield
  +class ErrorLoggingSession(session.Session):
  + """Wrapper around a Session that logs errors in run().
  + """
  +
  + def run(self, *args, **kwargs):
  + try:
  + return super(ErrorLoggingSession, self).run(*args, **kwargs)
  + except Exception as e: # pylint: disable=broad-except
  + logging.error(str(e))
  + raise
  +
  +
  @tf_export("test.TestCase")
  class TensorFlowTestCase(googletest.TestCase):
  """Base class for tests that need to test TensorFlow.
  @@ -1853,7 +1865,7 @@ class TensorFlowTestCase(googletest.TestCase):
  rewriter_config_pb2.RewriterConfig.OFF)
  return config
  - return session.Session(graph=graph, config=prepare_config(config))
  + return ErrorLoggingSession(graph=graph, config=prepare_config(config))
  @contextlib.contextmanager
  def _get_cached_session(self,
  