Univention Bugzilla – Bug 36645
Every Grid resize throws a exception
Last modified: 2015-01-29 11:50:30 CET
ErrorCtor {message: undefined, stack: (...), dojoType: "cancel", name: "CancelError", constructor: function} "Error at Error (native) at new ErrorCtor (http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/errors/create.js:13:21) at Promise.Deferred.cancel.promise.cancel [as cancel] (http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/Deferred.js:293:16) at declare._handleResize (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/widgets/Grid.js:343:26) at http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/_base/lang.js:384:45 ---------------------------------------- rejected at Promise.Deferred.cancel.promise.cancel [as cancel] (http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/Deferred.js:295:6) at declare._handleResize (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/widgets/Grid.js:343:26) at http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/_base/lang.js:384:45 ---------------------------------------- Error at Object.lang.mixin.defer (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/tools.js:1485:19) at declare._handleResize (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/widgets/Grid.js:345:33) at http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/_base/lang.js:384:45" instrumentation.js:20 ErrorCtor {message: undefined, stack: (...), dojoType: "cancel", name: "CancelError", constructor: function} "Error at Error (native) at new ErrorCtor (http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/errors/create.js:13:21) at Promise.Deferred.cancel.promise.cancel [as cancel] (http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/Deferred.js:293:16) at declare._handleResize (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/widgets/Grid.js:343:26) at http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/_base/lang.js:384:45 ---------------------------------------- rejected at Promise.Deferred.cancel.promise.cancel [as cancel] (http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/Deferred.js:295:6) at declare._handleResize (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/widgets/Grid.js:343:26) at http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/_base/lang.js:384:45 ---------------------------------------- Error at Object.lang.mixin.defer (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/tools.js:1485:19) at declare._handleResize (http://10.200.27.5/umc-dev/js_$20140911232251$/umc/widgets/Grid.js:345:33) at http://10.200.27.5/umc-dev/js_$20140911232251$/dojo/_base/lang.js:384:45"
The error message is just due to cancelling a running Deferred (in this case tools.defer() for some resize event handling). I do not see whether there is a way around this in Dojo (well, patching dojo/Deferred).
We received this as external feedback. A customer thought this was an real error.
I think I was wrong. I guess, we just need an error handler to catch the cancel error. The following cancel is logged on the console: > d = new Deferred() > d.cancel() > c {message: undefined, log: false, stack: (...), dojoType: "cancel", name: "CancelError"…} > "Error > at Error (native) > ... Whereas the following lines will catch that error: > d = new Deferred() > d = d.then(null, function() { console.log('error caught!'); }) > d.cancel() > > error caught! >
Created attachment 6477 [details] patch
patch applied. YAML adapted.
Fix: OK YAML: OK (fixed typo)
I noticed a similar CancelError which is thrown with the new notifications. Could you please adjust this, as well?
(In reply to Alexander Kläser from comment #7) > I noticed a similar CancelError which is thrown with the new notifications. > Could you please adjust this, as well? fixed, too. svn r57311 YAML adapted in svn r57314
Fix: OK YAML: OK
<http://errata.univention.de/ucs/4.0/51.html>