Skip to content

Commit

Permalink
fix: Corrected a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-coster committed Dec 18, 2023
1 parent f72d9b0 commit 963ce05
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To that end, custom error classes let you control *exactly* what information is
### Case study: `ENOENT` in Node's `fs` module
In Node, if you try to `fs.readFileSync()` a non-existent file, an error is thrown. If you catch that error and inspect it, you'll see that it's a regular old `Error` instance (i.e. *not* from child class) but has had several new fields added to it: `errno`, `syscall`, `code`, and `path`.
In Node, if you try to `fs.readFileSync()` a non-existent file, an error is thrown. If you catch that error and inspect it, you'll see that it's a regular old `Error` instance (i.e. *not* from a child class) but has had several new fields added to it: `errno`, `syscall`, `code`, and `path`.
When `try`/`catch`ing code that might throw such an error, you have to handle it like this:
Expand Down

0 comments on commit 963ce05

Please sign in to comment.