Author: bargull
Date: 2007-10-22 15:01:24 -0700 (Mon, 22 Oct 2007)
New Revision: 6955
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
Log:
Change 20071022-bargull-2 by [EMAIL PROTECTED] on 2007-10-22 01:13:18
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Update LzLoader errorhandling for LzHTTPDataProvider
New Features:
Bugs Fixed:
LPP-4946 - "dataset getErrorString return null"
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Updated error-handling in LzLoader to conform to the new LzHTTPDataProvider
class.
In proxied applications, LPS sends a special error-xml response to forward any
errors (<resultset><error status="..." msg="..." /></resultset>).
And LzHTTPDataProvider#loadResponse(..) determines on the basis of this
xml-response any errors. Unfortunately LzLoader#onerror did not send the whole
xml-response, but only the value of the "msg"-attribute.
So, I've updated LzLoader#onerror to send the xml-response if its owner is a
LzHTTPLoader, in any other case it is sending an appropriate error-message just
like before.
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs 2007-10-22
21:50:39 UTC (rev 6954)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs 2007-10-22
22:01:24 UTC (rev 6955)
@@ -113,7 +113,9 @@
} else {
var lmname = "loadmc" + this.loadmcdepth;
if (this.mc[lmname]) {
- Debug.error("%w.mc[%s]: %w", this, lmname, this.mc[lmname]);
+ if ($debug) {
+ Debug.error("%w.mc[%s]: %w", this, lmname, this.mc[lmname]);
+ }
}
this.mc.attachMovie( "empty" , lmname , this.loadmcdepth );
var newmc = this.mc[ lmname ];
@@ -200,9 +202,15 @@
}
if ( err != null ){
- Debug.error( err );
+ if ($debug) {
+ Debug.error( err );
+ }
if (this.onerror.ready) {
- this.onerror.sendEvent( err );
+ /* we need to pass the data-object if our owner is a LzHTTPLoader,
+ * to conform to the new LzHTTPDataProvider class,
+ * also see "LzHTTPDataProvider#loadResponse(..)"
+ */
+ this.onerror.sendEvent( this.owner instanceof LzHTTPLoader ? data
: err );
}
return;
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins