Chack Var existe para o erro de pular no JavaScript

try{

//code that causes an error

}catch(e){

functionToHandleError(e);
}
//continue from here
Rays