Prev | Current Page 378 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


Creating a Complete Exception Class
The more you use the haXe language, the more likely you will continue to modify and extend an array of
classes that you have created yourself and that do not exist in the main haXe library. As error and
exception handling are often highly individual to the developer, it makes sense for your custom class
arsenal to contain an all powerful exception class for use in your everyday applications. As time goes on,
you may find it necessary to add platform - specific code that can deal with tasks such as saving log
information to a text file, posting exception data from a Flash movie back to the server for cataloging,
and even developing a third - party trace or object viewer application. All is certainly possible with haXe.
However, for now, it is important to get the fundamental features required to make your development
life easier.
195
Chapter 7: When Things Go Wrong
The Bare Necessities
As a starting point, take the base code from the GenericError class you constructed earlier.


Pages:
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390