I love async/await and and the same time I despise try/catch, so I tend to use .catch() method for error handling. Just looks neater. I wish I could do all exception handling that way.
i think, as a matter of fact, that you can do all error handling this way. The functional programming folks found that out and called the resulting pattern a Monad. Take a look at m.youtube.com/watch?v=Mw_Jnn_Y5iA#
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I love async/await and and the same time I despise try/catch, so I tend to use .catch() method for error handling. Just looks neater. I wish I could do all exception handling that way.
i think, as a matter of fact, that you can do all error handling this way. The functional programming folks found that out and called the resulting pattern a Monad. Take a look at m.youtube.com/watch?v=Mw_Jnn_Y5iA#