Chapter 12: move and rename async stack trace example

This commit is contained in:
Beth Griggs
2020-11-15 01:18:10 +00:00
parent cb0e52e541
commit 86ee6d5893
@@ -0,0 +1,13 @@
foo().then(
() => console.log("success"),
(error) => console.error(error.stack)
);
async function foo() {
await bar();
}
async function bar() {
await Promise.resolve();
throw new Error("Fail");
}