typhon
typhon copied to clipboard
Refactor errors
I was looking at the codebase and thinking if I can make some part a bit nicer. Here is my first attempt.
I have:
- added unit tests for
ErrorFilter
function to lock behaviour and be sure later that I am not changing it. - removed dead code
- refactored
ErrorFilter
function to-
return
early - avoid
else
as much as possible - not duplicate work
- decrease number of indented code
- decrease brain buffer when reading code flow
-
I can do more PRs like this one if you find it useful.