mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2025-11-02 02:55:40 +08:00
Update readme-general-toc-4.md
This commit is contained in:
@ -45,7 +45,7 @@ This repository summarizes and curates most of the knowledge gathered to date on
|
|||||||
# `Error Handling Practices`
|
# `Error Handling Practices`
|
||||||
<p align="right"><a href="#table-of-contents">⬆ Return to top</a></p>
|
<p align="right"><a href="#table-of-contents">⬆ Return to top</a></p>
|
||||||
|
|
||||||
##  Use async-await for async error handling
|
## <img src="assets/images/checkbox-sm.png"> Use async-await for async error handling
|
||||||
|
|
||||||
**TL;DR:** Handling async errors in callback style is probably the fastest way to hell (a.k.a the pyramid of doom). The best gift you can give to your code is using instead a reputable promise library or async-await which provides much compact and familiar code syntax like try-catch
|
**TL;DR:** Handling async errors in callback style is probably the fastest way to hell (a.k.a the pyramid of doom). The best gift you can give to your code is using instead a reputable promise library or async-await which provides much compact and familiar code syntax like try-catch
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user