mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
add an error event to the rpc client
This commit is contained in:
parent
074c2f85a5
commit
ba909ebcc9
1 changed files with 5 additions and 1 deletions
|
@ -58,7 +58,9 @@ Ext.namespace('Ext.ux.util');
|
||||||
* Fires when the client has retrieved the list of methods from the server.
|
* Fires when the client has retrieved the list of methods from the server.
|
||||||
* @param {Ext.ux.util.RpcClient} this
|
* @param {Ext.ux.util.RpcClient} this
|
||||||
*/
|
*/
|
||||||
'connected'
|
'connected',
|
||||||
|
|
||||||
|
'error'
|
||||||
);
|
);
|
||||||
this.reloadMethods();
|
this.reloadMethods();
|
||||||
},
|
},
|
||||||
|
@ -109,6 +111,7 @@ Ext.namespace('Ext.ux.util');
|
||||||
} else {
|
} else {
|
||||||
options.failure(errorObj, response, requestOptions);
|
options.failure(errorObj, response, requestOptions);
|
||||||
}
|
}
|
||||||
|
this.fireEvent('error', responseObj, response, requestOptions)
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSuccess: function(response, requestOptions) {
|
_onSuccess: function(response, requestOptions) {
|
||||||
|
@ -121,6 +124,7 @@ Ext.namespace('Ext.ux.util');
|
||||||
} else {
|
} else {
|
||||||
options.failure(responseObj, response, requestOptions);
|
options.failure(responseObj, response, requestOptions);
|
||||||
}
|
}
|
||||||
|
this.fireEvent('error', responseObj, response, requestOptions)
|
||||||
} else {
|
} else {
|
||||||
if (Ext.type(options.success) != 'function') return;
|
if (Ext.type(options.success) != 'function') return;
|
||||||
if (options.scope) {
|
if (options.scope) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue