Hi Gaetan,
> Hi list,
>
> I've been having the following problem for quite a while: whenever I
> throw an exception in a code which is executed in a callback of a
> request, nothing noticeable happens, except the request just timeouts
> (ie the initial exception is not printed in the (Firebug) console).
>
> var req = new qx.io.remote.Request("/");
> req.setProhibitCaching(false);
> req.addEventListener("completed", function(e) {
> throw new Error("test");
> }, this);
> req.send();
>
> I've just found a workaround, which is to enclose the callback code
> into a try catch block and use this.error, as in:
>
> var req = new qx.io.remote.Request("/");
> req.addEventListener("completed", function(e) {
> try {
> throw new Error("test");
> } catch (error) {
> this.error('Error in IO request', error);
> }
> }, this);
> req.send();
>
> This seems to work fine but produces longer than necessary tracebacks
> and also require me to modify all my callbacks. I'd like a global fix
> or workaround. This might not be a Qooxdoo bug (I suspect it's rather
> a firebug bug or missing feature), but nevertheless, has anybody
> found a solution or another nicer workaround to this?
>
I suspect the problem are these lines of code in qx.io.remote.Exchange:900
try{
this.dispatchEvent(vResponse);
} catch(ex) {
this.error("Dispatch failed", ex);
}
The event dispatch is enclosed by a try catch block, which might "eat"
your exception. What happens if you comment out the "try/catch"
statement and call dispatchEvent without it?
Best Fabian
--
Fabian Jakobs
JavaScript Framework Developer
1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe
Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel