codeql/javascript/ql/test/library-tests/stmts/guardedCatch.js

10 строки
146 B
JavaScript

function f(g) {
try {
g();
} catch (e if e instanceof Error) {
console.log("error!");
} catch (e) {
console.log("something else!");
}
}