Chack var existe por error de omitir en JavaScript

try{

//code that causes an error

}catch(e){

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