message: In VariableScope.__enter__() only exit the graph context manager if an exception occurred.
  This change also fixes the VariableScope.__exit__() logic so that the component contexts are exited even if an exception is raised in one of their exit methods.
diff: @@ -2221,10 +2221,11 @@ class variable_scope(object):
  try:
  return self._enter_scope_uncached()
  - finally:
  + except:
  if (self._in_graph_mode and not self._building_function and
  self._graph_context_manager is not None):
  self._graph_context_manager.__exit__(*sys.exc_info())
  + raise
  def _enter_scope_uncached(self):
  """Enters the context manager when there is no cached scope yet.
  @@ -2346,12 +2347,18 @@ class variable_scope(object):
  return entered_pure_variable_scope
  def __exit__(self, type_arg, value_arg, traceback_arg):
  + try:
  self._cached_pure_variable_scope.__exit__(type_arg, value_arg,
  traceback_arg)
  + finally:
  + try:
  if self._current_name_scope:
  - self._current_name_scope.__exit__(type_arg, value_arg, traceback_arg)
  + self._current_name_scope.__exit__(type_arg, value_arg,
  + traceback_arg)
  + finally:
  if self._in_graph_mode and not self._building_function:
  - self._graph_context_manager.__exit__(type_arg, value_arg, traceback_arg)
  + self._graph_context_manager.__exit__(type_arg, value_arg,
  + traceback_arg)
  # pylint: disable=g-doc-return-or-yield
  