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:
Diffstat (limited to 'sphinx/domains/std.py')
-rw-r--r--sphinx/domains/std.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
index fbbed3a6b..016f84ebc 100644
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -1061,10 +1061,10 @@ class StandardDomain(Domain):
try:
figure_id = target_node['ids'][0]
return env.toc_fignumbers[docname][figtype][figure_id]
- except (KeyError, IndexError):
+ except (KeyError, IndexError) as exc:
# target_node is found, but fignumber is not assigned.
# Maybe it is defined in orphaned document.
- raise ValueError
+ raise ValueError from exc
def get_full_qualified_name(self, node: Element) -> str:
if node.get('reftype') == 'option':