[Laszlo-dev] Misleading error message for script error when referencing null object
Henry Minsky
henry.minsky at gmail.com
Wed Jun 8 07:29:24 PDT 2011
It might be possible to put some kind of emergency error message display
code into the top level application class, which has a catch of all errors
and displays a text box on the stage.
The next best thing is to launch the app using the flex debugger "fdb"
e.g.,
fdb "http://localhost:8080/yourapp.lzx"
And that will print the errors to the fdb console
On Wed, Jun 8, 2011 at 7:25 AM, Raju Bitter <
r.bitter.mailinglists at googlemail.com> wrote:
> Which doesn't help you in that case since the application doesn't even
> load/initialize, and there is no debugger window.
>
> On Wed, Jun 8, 2011 at 3:41 PM, P T Withington <ptw at pobox.com> wrote:
> > Well, you didn't put the code into "LzScript" either. That was done by
> the compiler. In general, you can't expect the "assembly language debugger"
> to understand the source language. That's why there is a separate source
> language debugger.
> >
> > On 2011-06-08, at 06:36, Raju Bitter wrote:
> >
> >> I know Tucker, but I didn't put the code into the method
> >> "runToplevelDefinitions". That must have been done by the compiler.
> >>
> >> On Wed, Jun 8, 2011 at 2:10 PM, P T Withington <ptw at pobox.com> wrote:
> >>> The error you are describing here is the error generated by the swf10
> player. OL has no control over that.
> >>>
> >>> On 2011-06-08, at 04:33, Raju Bitter wrote:
> >>>
> >>>> When using a <script when="immediate" />, the error message I get when
> >>>> referencing a null object in the SWF10 runtime is not very detailed.
> >>>>
> >>>> TypeError: Error #1010: A term is undefined and has no properties.
> >>>> at LzApplication/runToplevelDefinitions()
> >>>> at LFCApplication/initLFC()
> >>>> at flash.display::DisplayObjectContainer/addChild()
> >>>> at flash.display::Stage/addChild()
> >>>> at LzPreloader/enterFrame()
> >>>>
> >>>> Here is the LZX code:
> >>>>
> >>>> <canvas>
> >>>> <script when="immediate">
> >>>> var someObj = {};
> >>>> someObj.missing.test = {};
> >>>> </script>
> >>>> </canvas>
> >>>>
> >>>> If the script is not run with the when="immediate", but at default
> >>>> initialization time, I get the following message:
> >>>>
> >>>> TypeError: Error #1010: A term is undefined and has no properties.
> >>>> at MethodInfo-35()
> >>>> at LzScript()
> >>>> at LzNode/makeChild()
> >>>> at LzInstantiatorService/makeSomeViews()
> >>>> at LzInstantiatorService/checkQ()
> >>>> at Function/http://adobe.com/AS3/2006/builtin::call()
> >>>> at LzEvent/sendEvent()
> >>>> at LzIdleKernel$/__update()
> >>>>
> >>>> I guess the reason is that scripts which run immediately are included
> >>>> into the top-level definitions of the application?
> >>>
> >>>
> >
> >
>
>
--
Henry Minsky
Nest Labs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20110608/4289fe1a/attachment.html
More information about the Laszlo-dev
mailing list