Add content for errors in Node.js roadmap (#2695)

* Update 101-system-errors.md

* Update 102-user-specified-errors.md

* Update content/roadmaps/107-nodejs/content/103-nodejs-error-handling/103-error-types/101-system-errors.md

* Update content/roadmaps/107-nodejs/content/103-nodejs-error-handling/103-error-types/102-user-specified-errors.md

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/2701/head
Kalpit Shah 2 years ago committed by GitHub
parent 24693f1089
commit 460da72850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      content/roadmaps/107-nodejs/content/103-nodejs-error-handling/103-error-types/101-system-errors.md
  2. 7
      content/roadmaps/107-nodejs/content/103-nodejs-error-handling/103-error-types/102-user-specified-errors.md

@ -1 +1,24 @@
# System errors
# System Errors
Node.js generates system errors when exceptions occur within its runtime environment. These usually occur when an application violates an operating system constraint.
For example, a system error will occur if an application attempts to read a file that does not exist.
Below are the system errors commonly encountered when writing a Node.js program
1. EACCES - Permission denied
2. EADDRINUSE - Address already in use
3. ECONNRESET - Connection reset by peer
4. EEXIST - File exists
5. EISDIR - Is a directory
6. EMFILE - Too many open files in system
7. ENOENT - No such file or directory
8. ENOTDIR - Not a directory
9. ENOTEMPTY - Directory not empty
10. ENOTFOUND - DNS lookup failed
11. EPERM - Operation not permitted
12. EPIPE - Broken Pipe
13. ETIMEDOUT - Operation timed out
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://nodejs.org/api/errors.html#class-systemerror'>Node.js Errors - Official Docs</BadgeLink>

@ -1 +1,6 @@
# User specified errors
# User Specified Errors
User specified errors can be created by extending the base Error object, a built-in error class. When creating errors in this manner, you should pass a message string that describes the error. This message can be accessed through the message property on the object. The Error object also contains a name and a stack property that indicate the name of the error and the point in the code at which it is created.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.honeybadger.io/blog/errors-nodejs/'>A Comprehensive Guide To Error Handling In Node.js</BadgeLink>

Loading…
Cancel
Save