You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dart format really likes to collapse empty {} blocks onto a single line. However, in the case of a try-catch-finally chain, I think that it would be better not to do that if there is an non-empty block of statements later in the chain. For example:
Yeah, I agree the formatting isn't ideal here. It should be fairly straightforward to fix.
However, I'll also point out that having an entirely empty catch block without even a comment explaining why you're ignoring an exception might not be ideal code either. :)
dart format
really likes to collapse empty{}
blocks onto a single line. However, in the case of atry
-catch
-finally
chain, I think that it would be better not to do that if there is an non-empty block of statements later in the chain. For example:dart format
(version 2.13.1 stable) formats it as:which I think is rather misleading since it appears that
cleanupSomething()
is called only in response to a thrownException
.The text was updated successfully, but these errors were encountered: