Clutch

Changes coming to Node.js Errors 

Changes coming to Node.js Errors 
Average rating: 0
(0 votes)

Until recently most of the Errors thrown by Node.js only had a message associated with them. Now changes are coming to Errors thrown by the Node.js runtime from Node.js 8 and will continue to flow in during Version 9. Read about changes coming to Node.js Errors.

In his original post, Michael Dawson explains the matter of changes and suggests on what you should be doing now to get ready.

Before changes came if you wanted to have your code take a specific action based on the Error, you would have had to compare the message string to a known value. Now you might have noticed that there is a typo in the message.

The changes being made are to add a ‘code’ to all of the error objects thrown by the Node.js APIs. These codes are being documented in the API docs in https://nodejs.org/dist/latest-v8.x/docs/api/errors.html#errors_node_js_error_codes

To find details and examples go to the full article we mentioned in the beginning.

 

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111