forked from extern/egroupware
fixed some issues with egw_data, improved egw_json exception handling
This commit is contained in:
parent
a9c1112dc1
commit
b134b36678
@ -156,7 +156,8 @@ egw.extend("data", egw.MODULE_APP_LOCAL, function (_app, _wnd) {
|
||||
function(result) {
|
||||
parseServerResponse(result, _callback, _context);
|
||||
},
|
||||
this
|
||||
this,
|
||||
true
|
||||
);
|
||||
request.sendRequest();
|
||||
}
|
||||
@ -299,7 +300,7 @@ egw.extend("data_storage", egw.MODULE_GLOBAL, function (_app, _wnd) {
|
||||
* data.
|
||||
*/
|
||||
dataHasUID: function (_uid) {
|
||||
return typeof this.localStorage[_uid] !== "undefined";
|
||||
return typeof localStorage[_uid] !== "undefined";
|
||||
},
|
||||
|
||||
/**
|
||||
@ -310,7 +311,7 @@ egw.extend("data_storage", egw.MODULE_GLOBAL, function (_app, _wnd) {
|
||||
|
||||
var result = [];
|
||||
|
||||
for (var key in this.localStorage)
|
||||
for (var key in localStorage)
|
||||
{
|
||||
var parts = key.split("::");
|
||||
if (parts[0] === _prefix)
|
||||
|
@ -35,7 +35,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
||||
* Internal implementation of the JSON request object.
|
||||
*/
|
||||
function json_request(_menuaction, _parameters, _callback, _context,
|
||||
_sender, _async, _egw)
|
||||
_async, _sender, _egw)
|
||||
{
|
||||
// Copy the parameters
|
||||
this.url = _egw.ajaxUrl(_menuaction);
|
||||
@ -115,7 +115,9 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
||||
);
|
||||
|
||||
} catch(e) {
|
||||
this.egw.debug('error', 'Exception "', e ,'" while handling JSON response type "', res.type, '", plugin', plugin, 'response', res);
|
||||
var msg = e.message ? e.message : e + '';
|
||||
var stack = e.stack ? "\n-- Stack trace --\n" + e.stack : ""
|
||||
this.egw.debug('error', 'Exception "' + msg + '" while handling JSON response type "' + res.type + '", plugin', plugin, 'response', res, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user