mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
28 lines
517 B
JavaScript
28 lines
517 B
JavaScript
function try1(x) {
|
|
try {
|
|
x.ordinaryProperty; // OK - try/catch indicates intent to throw exception
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function try2(x) {
|
|
try {
|
|
x.ordinaryProperty; // OK - try/catch indicates intent to throw exception
|
|
return x;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function try3(x) {
|
|
try {
|
|
x.ordinaryProperty()
|
|
x.ordinaryProperty // $ Alert
|
|
return x;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|