summaryrefslogtreecommitdiff
path: root/sphinx/domains/std.py
diff options
context:
space:
mode:
authorRam Rachum <ram@rachum.com>2020-06-14 00:46:19 +0300
committerRam Rachum <ram@rachum.com>2020-06-14 14:37:16 +0300
commit53c1dff91c0b7100e1ce1b51acbf0fffbc10cf9c (patch)
tree93bca0f98dfcf0f83f32987f898a7fbafe8f25dd /sphinx/domains/std.py
parent0fc97a0b56d31f2703ff42dfe946e8d11d667909 (diff)
downloadsphinx-git-53c1dff91c0b7100e1ce1b51acbf0fffbc10cf9c.tar.gz
Fix exception causes all over the codebase
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':