From 81716438ecc5719cda07138da9bf72301d0cd545 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 5 Aug 2021 16:20:53 +0800 Subject: [PATCH] doc/_ext: print out the module which fails the build Signed-off-by: Kefu Chai --- doc/_ext/ceph_confval.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 25a3f8bc7b23..cde538b45c9a 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -355,7 +355,11 @@ class CephOption(ObjectDescription): def _render_option(self, name) -> str: cur_module = self._current_module() if cur_module: - opt = self._load_module(cur_module).get(name) + try: + opt = self._load_module(cur_module).get(name) + except Exception as e: + message = f'Unable to load module "{cur_module}": {e}' + raise self.error(message) else: opt = self._load_yaml().get(name) if opt is None: -- 2.47.3