Skip to content

Instantly share code, notes, and snippets.

Eran Hammer hueniverse

Block or report user

Report or block hueniverse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hueniverse
hueniverse / domains.md
Last active Dec 2, 2018
Node Error Handling and Domains
View domains.md

Node Error Handling and Domains

"Occurrences in this domain are beyond the reach of exact prediction because of the variety of factors in operation, not because of any lack of order in nature." - Albert Einstein

"Master of my domain" - Larry David

Error handling in an asynchronous language works in a unique way and presents many challenges, some unexpected. This tutorial reviews the various error handling patterns available in node, and explains how domains can be used to improve it.

There are four main error handling patterns in node:

  • Error return value
You can’t perform that action at this time.