What ??™ s more, each feature is well thought out, powerful and
useful, leaving you wondering why the platform creators hadn ??™ t supplied as much exception and
logging functionality themselves.
In this chapter, you will discover:
How to trace your code for each platform
How to extend the tracing capability
How to reroute the existing trace functionality to an alternative handling mechanism
What purpose exceptions facilitate in haXe
How to handle exceptions in your classes
The Trace Function
Those of you who are familiar with programming for ActionScript will already know the trace
function and all it entails. This neat little function allows the programmer to parse data to an
output panel in the Flash IDE, providing a large percentage of the debugging capabilities used by
??‘
??‘
??‘
??‘
??‘
180
Part I: The Core Language
Flash developers. The same is now true of haXe developers. How can this be done without an IDE? The
answer is simple. Instead of parsing the passed string data to an output panel, it is instead displayed in a
scrollable text field that is overlaid on top of the rest of the Flash movie.
Pages:
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355