Prev | Current Page 372 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

This means, unlike JavaScript and Flash, you
will always be able to catch exceptions within main .
The purpose of these functions is to provide a means to set a method within your application that can
specifically handle any uncaught exceptions. These handlers trap only exceptions that bubble up
through the parent class of the handler, so any exceptions requiring capture on a global scale will need to
be defined within the main application class.
The CallStack and ExceptionStack
Receiving information about an error is all well and good, but very often you need a little more
information to help resolve those troublesome bugs. For instance, when you catch an exception, you are
able to discover what you know about the event via the custom exception message. You can also find out
192
Part I: The Core Language
where and when the exception was thrown. What you can ??™ t necessarily find out, however, is what led to
the exception in the first place.
To help with this issue, haXe provides two cross - platform functions, haxe.


Pages:
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384