Typescript Error Handling

preview_player
Показать описание
The traditional way of handling errors in javascript is not relevant when handling errors in typescript. This video will show you how to effectively handle errors in your typescript project and handle them in way that adds type support, forces you to check for errors, and more.

Contents of this video:

0:00 - Intro
0:15 - Traditional Error Handling
1:18 - Disadvantages
2:12 - Better Error Handling
6:04 - Conclusion
Рекомендации по теме
Комментарии
Автор

Fantastic! But in the example you gave, you create the error objects that are thrown. Usually you would be getting errors from external sources who might not have a "message" property in them (also the object you retrieve happen might have a "message" property in it).

WhistleFantasy
Автор

Give the whole video some padding. Top two lines are hides behind video title when watching in full screen.

SirJagerYT
Автор

It's a bad code you should throw an exception when something goes wrong but not return error message because it's lead to additional constraints to clients of your code if client can handle exception it will catch it if not it will be catched on top level of your application

vitalikq
Автор

I just lost 20 minutes of concentration

dungam
join shbcf.ru