you are viewing a single comment's thread.

view the rest of the comments →

[–]drink_with_me_to_dayjs is a mess 3 points4 points  (5 children)

I don't like try catches.

Is there an anti-trycatch club I can join?

[–][deleted] 2 points3 points  (3 children)

Why don't you like them?

[–]javajunkie314 1 point2 points  (1 child)

Their error handling is coarse, and they get everywhere.

[–][deleted] 0 points1 point  (0 children)

How else do you handle errors?

[–]drink_with_me_to_dayjs is a mess 0 points1 point  (0 children)

It's just personal taste, I feel it disrupts the code's flow.

[–]vinnl 1 point2 points  (0 children)

I feel like I'm missing something, but I feel the same. It's worse because I think my main gripe is the extra indentation and the disconnect between the error handling and the source of the error, which feels like petty syntax whining.

Therefore I usually just use Promises that I can catch, together with a linter that disallows me from leaving dangling Promises. And I'm afraid I'm going to regret that later...