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-02-09 19:14:45 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-02-09 19:14:45 +0300
commitda64e5bdfaa4d59291b5c061baa341489f20f535 (patch)
treef1ea7b1f841356cdfa5804ba10a6a753fed72654 /sphinx/config.py
parent6e0119526a77a2820cf45b7eab3db75a45cb1918 (diff)
Close #7108: Allow to show an error message from conf.py via ConfigError
Diffstat (limited to 'sphinx/config.py')
-rw-r--r--sphinx/config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/config.py b/sphinx/config.py
index ca99fd5b7..87007c33d 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -324,6 +324,9 @@ def eval_config_file(filename: str, tags: Tags) -> Dict[str, Any]:
msg = __("The configuration file (or one of the modules it imports) "
"called sys.exit()")
raise ConfigError(msg)
+ except ConfigError:
+ # pass through ConfigError from conf.py as is. It will be shown in console.
+ raise
except Exception:
msg = __("There is a programmable error in your configuration file:\n\n%s")
raise ConfigError(msg % traceback.format_exc())