Raise errors when building with `sphinx-build`
Describe the bug
Hi,
Errors are not raised when building a documentation with sphinx-build version 8.1.3.
There is an option --exception-on-warning to forcibly raise errors on warnings, but there is no option to raise errors only on errors.
Related (closed and locked) request: https://github.com/sphinx-doc/sphinx/issues/10397#issuecomment-2191551430
Thank you!
How to Reproduce
I can't share my setup, but any sphinx doc with an error will work. For example, a doc with a "malformated" table:
+------------------------------+-----------------------------------------------+
| File name | Additional stuff |
+------------------------------+-----------------------------------------------+
| foo.json | This is a really long description really really long |
+------------------------------+-----------------------------------------------+
| boo.json | small desc |
+------------------------------+-----------------------------------------------+
Having this table, there is an error in the logs but no error is actually raised during build.
Environment Information
Platform: linux; (Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35)
Python version: 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0])
Python implementation: CPython
Sphinx version: 8.1.3
Docutils version: 0.21.2
Jinja2 version: 3.1.4
Pygments version: 2.18.0
Sphinx extensions
Additional context
No response
Please try the halt-level configuration setting in a Docutils configuration file in the project root directory. (You may also want to set traceback.)