Skip to content

Commit

Permalink
Build updates for try/catch implementation in io-xdr for remote io.sw…
Browse files Browse the repository at this point in the history
…f exceptions.
  • Loading branch information
TSHA committed Jul 19, 2011
1 parent f6f0e34 commit 1afea87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions build/io-xdr/io-xdr-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ YUI.add('io-xdr', function(Y) {
// across Flash's ExternalInterface.
_cB[o.id] = c;
w.setTimeout(function() {
if (o.c.send) {
try {
o.c.send(uri, { id: o.id,
uid: o.uid,
method: c.method,
data: c.data,
headers: c.headers });
}
else {
io.xdrResponse(o, c, 'transport error');
catch(e) {
io.xdrResponse('transport error', o, c);
delete _cB[o.id];
}
}, Y.io.xdr.delay);
Expand Down Expand Up @@ -242,7 +242,7 @@ YUI.add('io-xdr', function(Y) {
case 'timeout':
case 'abort':
case 'transport error':
o.e = e;
o.c = { status: 0, statusText: e };
case 'failure':
io.failure(_data(o, u, d), c);
delete m[o.id];
Expand Down Expand Up @@ -285,7 +285,7 @@ YUI.add('io-xdr', function(Y) {
* @description Fires event "io:xdrReady"
*
* @method xdrReady
* @private
* @protected
* @static
* @param {number} yid - YUI sandbox id.
* @param {number} uid - IO instance id.
Expand Down
2 changes: 1 addition & 1 deletion build/io-xdr/io-xdr-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions build/io-xdr/io-xdr.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ YUI.add('io-xdr', function(Y) {
// across Flash's ExternalInterface.
_cB[o.id] = c;
w.setTimeout(function() {
if (o.c.send) {
try {
o.c.send(uri, { id: o.id,
uid: o.uid,
method: c.method,
data: c.data,
headers: c.headers });
}
else {
io.xdrResponse(o, c, 'transport error');
catch(e) {
io.xdrResponse('transport error', o, c);
delete _cB[o.id];
}
}, Y.io.xdr.delay);
Expand Down Expand Up @@ -242,7 +242,7 @@ YUI.add('io-xdr', function(Y) {
case 'timeout':
case 'abort':
case 'transport error':
o.e = e;
o.c = { status: 0, statusText: e };
case 'failure':
io.failure(_data(o, u, d), c);
delete m[o.id];
Expand Down Expand Up @@ -285,7 +285,7 @@ YUI.add('io-xdr', function(Y) {
* @description Fires event "io:xdrReady"
*
* @method xdrReady
* @private
* @protected
* @static
* @param {number} yid - YUI sandbox id.
* @param {number} uid - IO instance id.
Expand Down

0 comments on commit 1afea87

Please sign in to comment.