Error handling Promises in JavaScript - Fun Fun Function

preview_player
Показать описание
💖 Support the show by becoming a Patreon

Today, we’re exploring error handling! We’re going to talk about how you shouldn’t swallow errors by doing crash reporting inside of functions. Instead, we’re going to look at how you can let errors propagate up to the interface by making use of promises.

🔗 Are you considering becoming a patron?

🔗 Discuss this episode on Fun Fun Forum

🔗 Promises video

🔗 Monad video

🔗 Felipe (my colleague that inspired the episode) on Twitter

🔗 mpj on Twitter

🔗 Help translate the show to your language
Рекомендации по теме
Комментарии
Автор

I love these "You're doing it wrong. Here's the better way" episodes. I find they are more pertinent to more advanced viewers who already know how promises work and are more representative of the real world.

MarcelRobitaille
Автор

Thank you a lot for making this content MPJME.
I was abble to pass through a technical interview because one of your videos, so THANK YOU SO MUCH!

KelvinRodrigues
Автор

The freedom to return and compose Promises is what made me fall in love with them. Thanks for sharing, and I concur with earlier commenters... let's see a deeper dive on this!

NWCalvank
Автор

YouTube just recommended your videos to me, and i'm absolutely hooked! Funny content while still managing to explain difficult concepts very well, i'm somewhere between laughing my ass off and getting up in the middle of the night to write some code!
Keep up the good work

Oh, and awesome music too

hanneshertach
Автор

It's been a while since I've watched your videos (just not enough time in the day) but I was pleasantly surprised with the production value of this one. I love the new opening sequence and the way you handle the picture-in-picture when your face is on screen. Just wanted to say keep up the good work!

AdamTuttle
Автор

'standardJS hippie' - i laughed quite a bit! :D

MiceInDownpour
Автор

that french press scene was awesomely over the top! love it

cupajoesir
Автор

This is one of the reasons I love golang. That is because errors are just values, they propogate, and wrap nicely for returns etc. and functions can return multiple values directly so they are easy to return.

mybigbeak
Автор

I love the intro! Please don't change.

lisaandbeans
Автор

Very uninformative and misleading video. This is not the proper way to make a coffee! (the Promise stuff was good as usual)

Arvigeus
Автор

You've got my like even before the content begins... Just for that intro with the coffee. Hahaha

jonathansilva
Автор

Awesome video man. I too was making the same mistakes with promises in the past... glad I'm not the only one :D

dusnoki
Автор

Very interesting topic. Would be great to see further, more sophisticated episodes about error handling in the future.

matthiasmuller
Автор

I would also mention a practice, where you make some logs/notifications in catch, but still throw error to the caller.
Promise.reject('some error').catch((e) => { doLogging(e); throw e; });
this can be usefull and u steal return promise with error to the "ui" component.

muxahuk
Автор

I hope we keep this opening for QUITE a while it's so exciting XD <3

Mathspy
Автор

Awesome song, very nice production and teaching!!!!

Patrick-yuet
Автор

Hello @mpj! Thank you so much for making this video. :-)

FelipeOliveiraCarvalho
Автор

"screw you, you standard JS hippie" 😂

colonelkob
Автор

Ha, I'm patron 1000. I just had to see it jump past 999. Uhhm, you videos are good also.

jasoni
Автор

You should make a video on a good way of handling errors from multiple queued promises

PapaLazarou
visit shbcf.ru