Prev | Current Page 362 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

push(???me???);
}
}
Compile the preceding class for both Neko and Flash, and then run them both. When run, the Flash
player should display a blank screen, while the Neko application will generate the following text:
Called from < null > line 1
Called from UncaughtException.hx line 6
Uncaught exception - Invalid field access : push
187
Chapter 7: When Things Go Wrong
This is an uncaught exception, which means, it is an exception that you have not caught and dealt with
in your code. The problem with the preceding class is that the Array t was not instantiated before the
method push was called, so as far as the virtual machine is concerned, there is no method called push
available. Now, the fact of the matter is, the Flash virtual machine would have hit the same wall that the
Neko virtual machine encountered, except that the Flash virtual machine chose to ignore the error and
continue as normal. Does this mean the exception was even generated? Maybe, but, like most invisible
pests, you ??™ ll need to catch one to prove it exists.


Pages:
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374