🐛 `SphinxNeedLayoutException` and `NeedumlException` subclass `BaseException` and escape every handler
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 72/100
Research direction
Start with the two class definitions at packages/sphinx-needs/src/sphinx_needs/layout.py:1325 and packages/sphinx-needs/src/sphinx_needs/directives/needuml.py:760-765, then find where the layout and uml/flow code raises them. Change the base class to Exception or SphinxError, and make the directive report a warning or Sphinx error instead of letting the exception escape. Done when a layout with a {{nosuch}} placeholder and uml("NOPE") produce a normal Sphinx error message rather than a traceback, and the existing tests still pass.
Written by the indexing model from the issue text.
Description
Two exception classes subclass BaseException rather than Exception:
SphinxNeedLayoutException(packages/sphinx-needs/src/sphinx_needs/layout.py:1325)NeedumlException(packages/sphinx-needs/src/sphinx_needs/directives/needuml.py:760-765)
They therefore bypass every except Exception in sphinx-needs and Sphinx's own top-level handler. Measured at master 3210ac5c (2026-10-14): a layout with a {{nosuch}} placeholder exits with code 1 and a raw traceback instead of a Sphinx error message; uml("NOPE") / flow("NOPE") / need() in a needuml take the same path by reading.
Fix: subclass Exception (or SphinxError), and let the directive turn them into a warning or a normal Sphinx error.
- Dominant language
- Python
- Stars
- 309
- Forks
- 103
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 170
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from useblocks/sphinx-needs
-
enhancement pkg: sphinx-codelinks
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
useblocks/sphinx-needs#2457 ·
Maintainers usually reply within 1 day
-
bug pkg: workspace
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
useblocks/sphinx-needs#2438 ·
Maintainers usually reply within 1 day
-
🐛 sphinx-test-reports: editing tr_report_template re-reads nothing in an incremental buildPossibly taken A pull request linked to this issue is open or already merged. Openbug pkg: sphinx-test-reports
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
useblocks/sphinx-needs#2427 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
useblocks/sphinx-needs#2413 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-test-reports
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
useblocks/sphinx-needs#2411 ·
Maintainers usually reply within 1 day
All issues in useblocks/sphinx-needs
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
micropython/micropython#19906 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
FinanceFlash/unvibecode#597 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
TomAnthony/YourOwnWeigh#21 ·
Maintainers usually reply within 1 day
-
[BUG]: Compliance rules never see Unity Catalog views as viewsPossibly taken @wagnercsantos claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
databrickslabs/ontos#1348 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days