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