Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-03 18:15:20 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-03 18:15:20 +0300
commit75203967d802c1660c45362b5a80b76a4daabd8a (patch)
tree73b6851adca5aace408cd7e641aea3bc2b601cca /sphinx/util/logging.py
parente7e9b4cbd0189967809810b7218c7b6d78af4a86 (diff)
parent787fda8e49616720e21208ed59297b41712e0c62 (diff)
Merge branch '3.x'
Diffstat (limited to 'sphinx/util/logging.py')
-rw-r--r--sphinx/util/logging.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py
index 5526d7538..5206363a5 100644
--- a/sphinx/util/logging.py
+++ b/sphinx/util/logging.py
@@ -411,9 +411,13 @@ class WarningIsErrorFilter(logging.Filter):
message = record.msg # use record.msg itself
if location:
- raise SphinxWarning(location + ":" + str(message))
+ exc = SphinxWarning(location + ":" + str(message))
else:
- raise SphinxWarning(message)
+ exc = SphinxWarning(message)
+ if record.exc_info is not None:
+ raise exc from record.exc_info[1]
+ else:
+ raise exc
else:
return True