Here is a piece of JavaScript code taken from a public commercial website. I have redacted some of the code to protect the guilty, but the rest is verbatim in all its glory. See if you can spot the error.
try {
doSomething();
} catch(err) {
// Die quietly
alert(err);
}
very funny 🙂
thanks for sharing ..
ummm no idea.. will the exception in inner function not result in CATCH being called?
whtevurr
I have an even more quiet solution !
try {
doSomething();
} catch(err) {
// Die a slow and quiet death
while(1) {
alert(err);
}
}
@Raman – alert is not exactly quiet.