You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by li...@apache.org on 2008/09/02 23:53:33 UTC
svn commit: r691400 - /incubator/shindig/trunk/features/core.io/io.js
Author: lindner
Date: Tue Sep 2 14:53:32 2008
New Revision: 691400
URL: http://svn.apache.org/viewvc?rev=691400&view=rev
Log:
SHINDIG-563 | Use try-catch block for accessing xobj.status, patch from Janek Hiis
Modified:
incubator/shindig/trunk/features/core.io/io.js
Modified: incubator/shindig/trunk/features/core.io/io.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core.io/io.js?rev=691400&r1=691399&r2=691400&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core.io/io.js (original)
+++ incubator/shindig/trunk/features/core.io/io.js Tue Sep 2 14:53:32 2008
@@ -68,9 +68,14 @@
if (xobj.readyState !== 4) {
return true;
}
- if (xobj.status !== 200) {
- // TODO Need to work on standardizing errors
- callback({errors : ["Error " + xobj.status]});
+ try {
+ if (xobj.status !== 200) {
+ // TODO Need to work on standardizing errors
+ callback({errors : ["Error " + xobj.status]});
+ return true;
+ }
+ } catch(e) {
+ callback({errors : ["Error not specified"]});
return true;
}
return false;