=function(){ try{ if(test&&typeof(test)=="function"){ test(); }else{ alert("non-existent function");} }catch(e){ } } function test(){ alert("function execution...");}