Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 11, 2022 05:59 am GMT

Error Node Quick Notes.

  1. Errors are handled with exceptions.
  2. throw keyword to break normal exectuion of javascript.
  3. Node.js has Error class from Error core module.
  4. Do, throw Error("My new error message."); or extend class and throw like Class MyCustomError extends Error(){}; throw new MyCustomError();
  5. uncaughtException there is predefined code block on https://nodejs.dev/en/learn/error-handling-in-nodejs/, implement it to avoid this error.
  6. Error handling with Promises.
  7. Error handling with Async/Wait.

Original Link: https://dev.to/ajaybaraiya6/error-node-quick-notes-4kk1

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To