Skip to content

Commit ba3f9df

Browse files
committed
Improve docstring
1 parent 25fc38d commit ba3f9df

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

readthedocs/doc_builder/environments.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,14 +457,18 @@ def __exit__(self, exc_type, exc_value, tb):
457457

458458
def handle_exception(self, exc_type, exc_value, _):
459459
"""
460-
Exception handling for __enter__ and __exit__
460+
Exception handling for __enter__ and __exit__.
461461
462462
This reports on the exception we're handling and special cases
463-
subclasses of BuildEnvironmentException. For
463+
subclasses of BuildEnvironmentException. For
464464
:py:class:`BuildEnvironmentWarning`, exit this context gracefully, but
465-
don't mark the build as a failure. For all other exception classes,
465+
don't mark the build as a failure. For all other exception classes,
466466
including :py:class:`BuildEnvironmentError`, the build will be marked as
467467
a failure and the context will be gracefully exited.
468+
469+
If the exception's type is :py:class:`BuildEnvironmentWarning` or it's
470+
an exception marked as ``WARNING_EXCEPTIONS`` we log the problem as a
471+
WARNING, otherwise we log it as an ERROR.
468472
"""
469473
if exc_type is not None:
470474
log_level_function = None

0 commit comments

Comments
 (0)