Open simonsan opened 3 years ago
Isn't web frameworks doing this? Is this really an anti-pattern?
Isn't web frameworks doing this? Is this really an anti-pattern?
In the "advantages" section it is mentioned
We can take a lot from the official documentation: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
@MarcoIeni
Why is it expecting a +
now for ul? :D
anti_patterns/catch_panic.md:76:1 MD004/ul-style Unordered list style [Expected: plus; Actual: dash]
anti_patterns/catch_panic.md:77:1 MD004/ul-style Unordered list style [Expected: plus; Actual: dash]
anti_patterns/catch_panic.md:78:1 MD004/ul-style Unordered list style [Expected: plus; Actual: dash]
anti_patterns/catch_panic.md:79:1 MD004/ul-style Unordered list style [Expected: plus; Actual: dash]
By default it expects the style to be consistent, see this
Since there is a +
on line 66 it expects that all the lists follow that.
By default it expects the style to be consistent, see this
Since there is a
+
on line 66 it expects that all the lists follow that.
ah ok, then it's nice!
just didn't see the plus and the error message was not so helpful as i'm used to from rustc :D
We only see what's bad, is there something that could be done instead of this pattern, if there is maybe we should show it.
We only see what's bad, is there something that could be done instead of this pattern, if there is maybe we should show it.
As this anti-pattern is focussed on "using a method that catches unexpected problems (implementation bugs) for handling an expected problem, such as a missing file.", Imho use good error handling
is the answer to this? What would you say?
EDIT: So a link to the error handling chapter on the rust book could be sufficient? Not sure, but open for your ideas. :)
I think that is an option but at least not so easy to pickup, but at least we have some suggestions. I am not aware of any straightforward switch.
Due to inactivity of the author and maintainers not being able to edit the PR I'll move #22 to a new branch in this repository.
Future fixes to the PR will be made on this branch.