functionconnectTo(url){varxhr=newXMLHttpRequest();xhr.open("GET",url,false);xhr.onreadystatechange=function(){if(xhr.readyState==xhr.DONE){throw"Troubles.";}};xhr.send();}try{connectTo("http://www.google.com");}catch(e){console.log('Exceptionhappend.');}也许“catch”部分将执行(在控制台中出现消息),但异常保持未捕获(=在控制台中出