Skip to content

Commit 84820ad

Browse files
committed
Add test for exception flow out of finally()
1 parent 948d21c commit 84820ad

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

javascript/ql/test/library-tests/TripleDot/exceptions.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,16 @@ function e4() {
6666
sink(e);
6767
}
6868
}
69+
70+
async function e5() {
71+
try {
72+
Promise.resolve(0).finally(() => {
73+
throw source("e5.1");
74+
});
75+
await Promise.resolve(0).finally(() => {
76+
throw source("e5.2");
77+
});
78+
} catch (e) {
79+
sink(e); // $ hasValueFlow=e5.2
80+
}
81+
}

0 commit comments

Comments
 (0)