I need a function that stop execute javascript when catch error. For example as follow:
function AA()
{
try{
executeScript();
}catch(e){
//stop execute javascript
}
}
function executeScript()
{
throw 'error';
}
function BB()
{
//some script
}
AA();
BB(); //don't execute when error happening
Has anybody know how to do it? Thanks for help.