Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need_count is impossible to debug. #1133

Open
nova308 opened this issue Feb 26, 2024 · 0 comments
Open

need_count is impossible to debug. #1133

nova308 opened this issue Feb 26, 2024 · 0 comments

Comments

@nova308
Copy link

nova308 commented Feb 26, 2024

In case the ratio syntax of :need_count: divides by 0 internally, the only error one receives is a division by zero exception on sphinx level.

:need_count:`id=='REQ_SW_DOESNOTEXIST' ? id=='REQ_SW_DOESNOTEXIST'`

gives
Extension error (sphinx_needs.needs): Handler <function process_creator.<locals>.process_caller at 0x7f1887f56310> for event 'doctree-resolved' threw an exception: division by zero)

This is way too little information in case some change made the need_count divide by zero by accident. In larger projects where needs might be created by automation, it can take days to find where the issue actually originates from. What makes it even worse is that dividing usually is not associated with "?" operands.

Please provide more information on what actually caused the issue so the problem can be resolved in seconds instead of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant