History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-3758
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Jim Grandy
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Java stack trace while compiling malformed JavaScript code

Created: 22/Mar/07 08:11 AM   Updated: 12/Mar/08 11:50 AM
Component/s: Compiler - JavaScript
Affects Version/s: 4.0.0
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 4,518
Runtime: N/A
Fix in hand: False


 Description  « Hide
From http://forum.openlaszlo.org/showthread.php?t=8741:

My first issue trying to use the DHTML is that the error messages were really confusing. Which source file does the following relate to

Error: org.openlaszlo.sc.parser.ParseException: Syntax error: the token "}" was not expected at this position at line 220, column 78.org.openlaszlo.utils.ChainedException: org.openlaszlo.sc.parser.ParseException: Syntax error: the token "}" was not expected at this position at line 220, column 78.
at org.openlaszlo.compiler.DHTMLWriter.close(DHTMLWri ter.java:323)
at org.openlaszlo.compiler.Compiler.compile(Compiler. java:428)
at org.openlaszlo.compiler.Compiler.compile(Compiler. java:171)
(many lines deleted)

Thanks

Zvi
Edit/Delete Message

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Zvi Schreiber - 22/Mar/07 11:00 AM
E.g. open the following program <canvas oninit="${}"/> with ?lzr=dhtml

P T Withington - 26/Mar/07 10:12 AM
Temporary work-around is to compile with lzt=swf7 to get proper syntax errors.

P T Withington - 27/Mar/07 09:21 AM
r4518 | ptw | 2007-03-27 13:20:27 -0400 (Tue, 27 Mar 2007) | 32 lines
Changed paths:
   M /openlaszlo/branches/legals/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
   M /openlaszlo/branches/legals/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ParseException.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationError.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java

Change 20070327-ptw-7 by ptw@dueling-banjos.local on 2007-03-27 08:10:38 EDT
    in /Users/ptw/OpenLaszlo/legals-1
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: DHTML compiler signals parse errors properly

Bugs Fixed:
LPP-3758 'Java stack trace while compiling malformed JavaScript code'

Technical Reviewer: hminsky (Message-ID: <8c61fad60703270847h59d473a7k84c4d129b0b4c696@mail.gmail.com>)
QA Reviewer: max (pending)
Doc Reviewer: n/a

Details:
    Compiler: Set pathname on ParseException, to make up for javacc
    shortcoming

    DHTMLWriter: Trampoline compiler exceptions into errors.

    CompilationEnvironment: Pass source locations to script compiler.
    Canonicalize pathnames when adjusting.

    CompilationError: Take file and location from ParseException's.

    Parser.jjt: Make pathname public.

    ParseException: Add an interface to hold the pathname.

Tests:
    Test case from bug report


Mamye Kratt - 12/Mar/08 11:50 AM
(trunk 4 build r8223)
Compilation error less confusing.