Bug 36645 - Every Grid resize throws a exception
Every Grid resize throws a exception
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Florian Best
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-13 15:19 CET by Florian Best
Modified: 2015-01-29 11:50 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Error handling, External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.46 KB, patch)
2014-11-27 13:09 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-11-13 15:19:43 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"
Comment 1 Alexander Kläser univentionstaff 2014-11-14 18:17:43 CET
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).
Comment 2 Florian Best univentionstaff 2014-11-25 11:15:42 CET
We received this as external feedback. A customer thought this was an real error.
Comment 3 Alexander Kläser univentionstaff 2014-11-26 18:47:40 CET
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!
>
Comment 4 Florian Best univentionstaff 2014-11-27 13:09:51 CET
Created attachment 6477 [details]
patch
Comment 5 Florian Best univentionstaff 2014-11-28 21:46:22 CET
patch applied.
YAML adapted.
Comment 6 Johannes Keiser univentionstaff 2014-12-05 10:30:16 CET
Fix: OK
YAML: OK (fixed typo)
Comment 7 Alexander Kläser univentionstaff 2015-01-13 13:40:26 CET
I noticed a similar CancelError which is thrown with the new notifications. Could you please adjust this, as well?
Comment 8 Florian Best univentionstaff 2015-01-14 12:41:27 CET
(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
Comment 9 Johannes Keiser univentionstaff 2015-01-15 12:04:02 CET
Fix: OK
YAML: OK
Comment 10 Janek Walkenhorst univentionstaff 2015-01-29 11:50:30 CET
<http://errata.univention.de/ucs/4.0/51.html>