130
Node.js Errors
The Node.js applications generally face four types of errors:
- Standard JavaScript errors i.e. <EvalError>, <SyntaxError>, <RangeError>, <ReferenceError>, <TypeError>, <URIError> etc.
- System errors
- User-specified errors
- Assertion errors
Node.js Errors Example 1
Let’s take an example to deploy standard JavaScript error – ReferenceError.
File: error_example1.js
Open Node.js command prompt and run the following code:
Node.js Errors Example 2
File: timer2.js
Open Node.js command prompt and run the following code:
Next TopicNode.js DNS