1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
this.getHttpRequest(identifier).onreadystatechange = function() { try { ajaxChat.handleResponse(identifier); } catch(e) { try { clearTimeout(ajaxChat.timer); } catch(e) { //alert(e); } try { if(data) { ajaxChat.addChatBotMessageToChatList('/error ConnectionTimeout'); ajaxChat.updateChatlistView(); } } catch(e) { //alert(e); } try { ajaxChat.timer = setTimeout('ajaxChat.updateChat(null);', ajaxChat.timerRate); } catch(e) { //alert(e); } } };
Refactorings
No refactoring yet !
GateKiller
July 23, 2008, July 23, 2008 08:35, permalink
Does it work if you remove all the try and catch statements?
1 2 3
this.getHttpRequest(identifier).onreadystatechange = function() { ajaxChat.handleResponse(identifier); };
This code crashes Firefox 3, badly: http://www.freeformroleplay.net/standalone/chat