Improve error reporting
- Dominant language
- Python
- Stars
- 45
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/apache/incubator-ponymail-foal/blob/4def8545bb894f1890f46d5a2628c54cb6e98831/tools/plugins/textlib.py#L40
It's not ideal for utility methods to use print to signal errors, as the caller has no choice as to whether the message appears or not. Also the function currently can return two different types. Callers need to check the return type on every call.
It would be easier for callers if the function raised an error instead.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at tools/plugins/textlib.py around line 40 and inspect the callers of the utility method to understand its current return values and error handling. Update the behavior so errors are raised consistently and callers no longer need to check for alternate return types; done means errors are delivered to callers instead of printed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100