Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: streamline errors.md introductory material #21138

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
Applications running in Node.js will generally experience four categories of
errors:

- Standard JavaScript errors such as:
- {EvalError} : thrown when a call to `eval()` fails.
- {SyntaxError} : thrown in response to improper JavaScript language
syntax.
- {RangeError} : thrown when a value is not within an expected range
- {ReferenceError} : thrown when using undefined variables
- {TypeError} : thrown when passing arguments of the wrong type
- {URIError} : thrown when a global URI handling function is misused.
- Standard JavaScript errors such as {EvalError}, {SyntaxError}, {RangeError},
{ReferenceError}, {TypeError}, and {URIError}.
- System errors triggered by underlying operating system constraints such
as attempting to open a file that does not exist, attempting to send data
over a closed socket, etc;
- And User-specified errors triggered by application code.
- `AssertionError`s are a special class of error that can be triggered whenever
as attempting to open a file that does not exist or attempting to send data
over a closed socket.
- User-specified errors triggered by application code.
- `AssertionError`s are a special class of error that can be triggered when
Node.js detects an exceptional logic violation that should never occur. These
are raised typically by the `assert` module.

Expand Down