DEV Community

Discussion on: Async + Await refactor, which do you like best?

Collapse
 
tailcall profile image
Maria Zaitseva

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.

Collapse
 
xtofl profile image
xtofl

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#