In LzRuntime.lzs:

    if (typeof window.addEventListener == 'function') {
      // The DOM 1 interface is more useful than the DOM 2 interface
      window.onerror = function (errorString, fileName, lineNo) {
        #pragma "warnUndefinedReferences=false"
        if (Debug.uncaughtBacktraceStack) {
          // If backtracing has caught our stack info, use that rather
          // than browser info
          message = new String(errorString);
          message.$lzsc$b = Debug.uncaughtBacktraceStack;
          Debug.uncaughtBacktraceStack = null;
          fileName = null;
          lineNo = null;
        }
==>        $reportSourceWarning(fileName, lineNo, message, true);
        // pass through to browser debugger
        return true;
      }
    }

seems like variable message may be undefined/uninitialied
at the ==> mark if Debug.uncaughtBacktraceStack is not set.

Also, now that we have 'noteCallSite' nicely modularized,
it seems like super.xxx calls could also be registered in the stack trace.
Maybe for future.

On Dec 2, 2007, at 8:56 PM, P T Withington wrote:

Change 20071202-ptw-w by [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (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

Files:
M      WEB-INF/lps/lfc/debugger/LzMessage.lzs
M      WEB-INF/lps/lfc/compiler/LzRuntime.lzs
M WEB-INF/lps/server/src/org/openlaszlo/sc/ JavascriptGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071202- ptw-w.tar


--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

Voice:  617-547-7881
Email:  [EMAIL PROTECTED]
WWW:    http://www.ddanderson.com

Reply via email to