Event Driven Programming – Error First Callbacks
When leveraging Node.js's asynchronous methods one needs to think about errors differently. In synchronous languages, if an error occurs (such as reading a file that doesn't exist), an exception is thrown. However, Node.js has the concept of an Error First callback, which allows you to asynchronously check the result of method and any error that may have occurred. In this video we review errors that stem from Event Driven Programming #1 and the appropriate way to handle them.