Grokking Node.js
Vote

0% completed

​

Handling Errors and Exception Management

Some errors are mistakes in the code, and others are events that the code should expect. A missing file, a refused network connection or a price typed as "abc" are not bugs: they happen to correct programs, and the program should answer them with a clear message. These are called operational errors. Reading a property of null or calling a function with the wrong arguments is different, because no message to the user can repair it. These are called programmer errors, and the fix is a change to the code.

The distinction decides what to do with each error

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content