Hi, reading this now.. this is excellent. I approve of this solution
over a check box; thank you so much! I don't use the nightly build
although maybe i should, as mostly, if something goes wrong, the
complexity of the apps (along with their generic take on the language, i
don't use any laszlo components) i work with would reveal conflicts
early. I can set that up. again, thanks for getting that in!
.j
P T Withington wrote:
Change 20090915-ptw-g by [email protected] on 2009-09-15 13:50:47 EDT
in /Users/ptw/OpenLaszlo/trunk-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Improve debugging of runtime errors
Bugs Fixed: LPP-8222 "User errors" don't work if catcherrors is turned on
Technical Reviewer: [email protected] (pending)
QA Reviewer: henry, [email protected] (pending)
Release Notes:
The debugger will now, by default, intercept runtime errors
(instances of Error that are thrown by the runtime or program) and
report them, to minimize the need to use the platform debuggers
for DHTML and swf9 (or later) when debugging LZX programs.
These reports can be silenced by throwing values that are not
instances of Error (the best choice if you are using try/catch for
control flow, not for error situations), or by adding: #pragma
"throwsError=true" to the function or method contaning the throw.
The reporting feature is independent of the lps.properties setting
compiler.catcherrors (which can be used to ignore runtime errors
in production code), however the #pragma will also prevent
compiler.catcherrors from interfering with the throw of an Error
object.
[This feature is not implemented in swf8, because uncaught errors
are always ignored in that runtime.]
Details:
test/lpp-8222: test throwing of a non-error, throwing an
uncaught error, throwing a caught error, and throwing a caught
error using the #pragma. The test is self-documenting and adapts
to the settings of debug and catcherrors.
LzDebug: Document the reporting of errors by the debugger and how
to silence the reports.
build.xml: Build swf10 first, since it has the strictest
compiler, so you don't waste time building other runtimes that
will only be broken.
LzDebugStub, LzBootstrapDebugService: Add a handler for reporting
errors (and eliminating multiple reports). Remove the old
top-level error handler, which is no longer needed.
JavascriptGenerator: Based on compiler.catcherrors, #pragma
"throwsError", and debug, construct an appropriate catch block
that records, reports, and re-throws or not.
Tests:
test/lpp-8222 X debug=true/false X compiler.catcherrors=true/false
X lzr=dhtml/swf9.
Files:
A test/lpp-8222.lzx
M WEB-INF/lps/lfc/debugger/LzDebug.lzs
M WEB-INF/lps/lfc/build.xml
M WEB-INF/lps/lfc/compiler/LzDebugStub.lzs
M WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20090915-ptw-g.tar