Files
codeql/javascript/ql/test/library-tests/stmts/guardedCatch.js
2018-08-02 17:53:23 +01:00

11 lines
212 B
JavaScript

function f(g) {
try {
g();
} catch (e if e instanceof Error) {
console.log("error!");
} catch (e) {
console.log("something else!");
}
}
//semmle-extractor-options: --experimental --extract-program-text