summaryrefslogtreecommitdiff
path: root/sphinx/builders/html/__init__.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/builders/html/__init__.py
parent0fc97a0b56d31f2703ff42dfe946e8d11d667909 (diff)
downloadsphinx-git-53c1dff91c0b7100e1ce1b51acbf0fffbc10cf9c.tar.gz
Fix exception causes all over the codebase
Diffstat (limited to 'sphinx/builders/html/__init__.py')
-rw-r--r--sphinx/builders/html/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py
index 5340c93f9..99d7aa13b 100644
--- a/sphinx/builders/html/__init__.py
+++ b/sphinx/builders/html/__init__.py
@@ -140,7 +140,7 @@ class BuildInfo:
build_info.tags_hash = lines[3].split()[1].strip()
return build_info
except Exception as exc:
- raise ValueError(__('build info file is broken: %r') % exc)
+ raise ValueError(__('build info file is broken: %r') % exc) from exc
def __init__(self, config: Config = None, tags: Tags = None, config_categories: List[str] = []) -> None: # NOQA
self.config_hash = ''
@@ -1015,7 +1015,7 @@ class StandaloneHTMLBuilder(Builder):
return
except Exception as exc:
raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") %
- (pagename, exc))
+ (pagename, exc)) from exc
if not outfilename:
outfilename = self.get_outfilename(pagename)