[Laszlo-dev] For Review: Change 20080403-dda-n Summary: Fix error messages from compiler
P T Withington
ptw at pobox.com
Thu Apr 3 14:46:57 PDT 2008
Approved! This is great -- I was just going to break out the pragmas
from the Function body for another issue I'm working on.
On 2008-04-03, at 17:24 EDT, Donald Anderson wrote:
> Change 20080403-dda-n by dda at lester.local on 2008-04-03 13:30:55 EDT
> in /Users/dda/laszlo/src/svn/openlaszlo/trunk-a
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Fix error messages from compiler
>
> New Features:
>
> Bugs Fixed: LPP-5692
>
> Technical Reviewer: ptw (pending)
> QA Reviewer: hminsky (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
> There were several errors that prevented compilation error
> messages from being delivered
> to the browser. Also running lzc gave an incorrect mapping of
> line numbers back to the
> original.
>
> SWF9External.java:
> Fixed the pattern that matches the error message so that it is
> easier to extract
> just the filename. This fixes problems of pathnames with dot (.)
> in them, and
> remapped directory names due to symlinks.
>
> In variable names and internal doc, renamed 'temp' directory to
> be 'work', so as
> not to be confused with the app server's temp dir.
>
> Cleaned up error messages. For the web, if possible to find the
> original line number, we show
> that. For lzc, we always show both the SWF9 compiler line number
> and the original line number.
>
> Remove the 'transitional' message that everyone was seeing in the
> browser, it no longer
> applies in any case.
>
> Count the number of lines in the preamble when we create a
> translation unit.
>
> CompilerError.java:
> Now extends CompilationError so it is treated uniformly with tag
> compiler errors.
>
> Function.java
> Separate the 'preface' of a function (includes pragmas) from the
> rest of the function,
> so that the #line can be placed after the pragmas to avoid any
> line number skew.
>
> TranslationUnit.java:
> Track the offset where the text of the function starts so that
> the 'package {'
> statement that appears at the beginning of the file doesn't throw
> off the line number count.
>
> NodeModel.java, ClassModel.java:
> separate pragmas from code when creating a 'Function' object.
>
> app-console.xslt:
> Translate newlines to <br /> in error messages, so that multiline
> error
> messages are formatted nicely. Oddly, some string processing
> requires a bit
> of work in XSLT.
>
>
> Tests:
> Inserted errors into .lzx files containing function bodies, and
> now see good error messages
> with the right line numbers in the browser.
>
> Regression: (smokecheck,weather) x (swf8,dhtml) + swf9/hello.lzx
>
> Files:
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/CompilerError.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/TranslationUnit.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
> M WEB-INF/lps/templates/app-console.xslt
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080403-dda-n.tar
>
>
>
> --
>
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
>
> voice: 617-547-7881
> email: dda at ddanderson.com
> www: http://www.ddanderson.com
>
>
>
>
More information about the Laszlo-dev
mailing list