DiODeProject / DiODeProject/MuMoT
Use of bare 'except:' is bad
- Dominant language
- Python
- Stars
- 24
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Bare `except:` statements will swallow up all exceptions, making debugging more difficult and possibly making certain code paths inaccessible. For example in `views.py` line 2887 can never be reached as the `except:` lines above will consume any raised `ZeroDivisionError`s.
```
2878 try:
2879 try:
2880 pyDScont['EQ' + str(EQ_iter)].backward()
2881 except:
2882 self._showErrorMessage('Continuation failure (backward) on initial branch
')
2883 try:
2884 pyDScont['EQ' + str(EQ_iter)].forward()
2885 except:
2886 self._showErrorMessage('Continuation failure (forward) on initial branch
')
2887 except ZeroDivisionError:
2888 self._show_computation_stop()
2889 self._showErrorMessage('Division by zero
')
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in views.py around lines 2878-2888 and review the bare except statements described in the issue, including how they affect the ZeroDivisionError handler. Done means the overly broad exception handling no longer prevents the documented division-by-zero path from being reached, while the affected continuation failures remain handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100