[Laszlo-checkins] r16597 - openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc

hqm@openlaszlo.org hqm at openlaszlo.org
Thu Jun 3 10:18:53 PDT 2010


Author: hqm
Date: 2010-06-03 10:18:51 -0700 (Thu, 03 Jun 2010)
New Revision: 16597

Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
Log:
Change 20100601-hqm-c by hqm at badtzmaru.home on 2010-06-01 14:59:03 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  better error reporting from compiler when using debug eval

New Features:

Bugs Fixed: LPP-9061

Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:
    

Details:
    

Tests:

debug eval of a function expression returns a compiler error instead of silent failure

test case below, Note that this ought the be a legal expression and
not get a compilation error, but there's another bug causing the free
reference to global 'canvas' to be regarded as undefined. But given that it does
generate a compile error, it is reported to the user.

lzx> (function (x) {return canvas})()  
'Parse error: org.openlaszlo.sc.CompilerError: line unknown: Error: Access of undefined property canvas, in line: return canvas\nline unknown: Error: Access of undefined property Error, in line: if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {\nline unknown: Error: Access of undefined property lz, in line: if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {\nline unknown: Error: Access of undefined property $lzsc$runtime, in line: $lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 2, $lzsc$e)' 
lzx> 




Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java	2010-06-03 17:14:07 UTC (rev 16596)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java	2010-06-03 17:18:51 UTC (rev 16597)
@@ -1154,6 +1154,12 @@
 
       mFlexTime = System.currentTimeMillis();
 
+      // Clean out old object file
+      File outf = new File(outfilename);
+      if (outf.exists()) {
+        outf.delete();
+      }
+
       // Call the Flex compiler, either in its own exec'ed process or in a thread 
       if (execFlex()) {
         execCompileCommand(cmd, workdir.getPath(), tunits, outfilename);



More information about the Laszlo-checkins mailing list