
| Key: |
LPP-5181
|
| Type: |
Bug
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
P0
|
| Assignee: |
Unassigned
|
| Reporter: |
P T Withington
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Minor
|
| Fixed in Change#: |
7,445
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
A new call is a function call, just like any other call expression, but the line number annotation is not updated for a new call. Hence an error in a constructor will report the incorrect line number in the caller. E.g.:
<canvas>
<script>
function Foo () { null.bar(); };
(function test () {
Debug.info("Current line number");
new Foo();
})();
</script>
</canvas>
Will give a backtrace showing the new call as coming from line #5 when it should say line #6.
|
|
Description
|
A new call is a function call, just like any other call expression, but the line number annotation is not updated for a new call. Hence an error in a constructor will report the incorrect line number in the caller. E.g.:
<canvas>
<script>
function Foo () { null.bar(); };
(function test () {
Debug.info("Current line number");
new Foo();
})();
</script>
</canvas>
Will give a backtrace showing the new call as coming from line #5 when it should say line #6. |
Show » |
|
Changed paths:
M /openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
M /openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMessage.lzs
M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
Change 20071202-ptw-w by ptw@dueling-banjos.local on 2007-12-02 20:37:06 EST
in /Users/ptw/OpenLaszlo/ringding-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Debugger improvements to help me with diamond DHTML
Bugs Fixed:
LPP-5182'We could give better backtraces for unhandled errors in DHTML'LPP-5181'new calls do not have correct line number in backtrace'Technical Reviewer: dda@ddanderson.com (Message-Id: <FA6270BB-CDAD-4533-B76B-25F0D9981C6C@ddanderson.com>)
QA Reviewer: ewinard@laszlosystems.com (pending)
Details:
LzMessage: Look for saved backtrace
LzRuntime: Pass uncaught error backtrace to LzMessage
JavascriptGenerator, CodeGenerator: Break out call-site
annotation, use in function calls and new calls
JavascriptGenerator: Put a catch block around all functions to
record a backtrace if an exception is thrown and not caught.
Tests:
smokecheck, test case from bugs