funmachine


Deixe um comentário

Node.js 101: Error Handling

“Why handle errors?”

Because as a programmer, catching errors is part of your job. You need to know when a disk write fails, a database query times out, or a web service returns zero bytes. You need to be able to react to exceptional (and not-so-exceptional) conditions, and do The Right Thing, even if The Right Thing is merely to print out that error and exit.

Node.js 101: Error Handling | Doug’s Home On The Web.