Table of contents
Check out the original file to see the original source.
Errors can be caught and shown, explicitly. Errors that are thrown but not explicitly will stop the markdown generation.
```ts eval --error --meta
throw new Error("def");
```
throw new Error(/* message: */ "def");
Error: def
Error blocks are eventually wrapped in a try-catch block, and have scope rules accordingly.
We can create a variable with const in an error block…
const a = "abc";
throw new Error(/* message: */ a);
Error: abc
And later create another const with the same name.
const a = "def";
a;
"def"
And a third time, we can re-create the const.
const a = "abc";
throw new Error(/* message: */ a);
Error: abc
The “a” variable was never changed.
a;
"def"
This document used eval-md