Prev | Current Page 377 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

While only experience and hard work can help you deal with the former
issue, the haXe exception features are your only real safeguard against the latter.
If you take a look at the exception handling capabilities of languages such as Java and C#, you ??™ ll notice
that they share a similar trait. In both of these languages, and others like them, exception classes are used
and served from the very most inner classes in the language framework. As exceptions are designed to
bubble up through the hierarchical structure until handled, therein lies their power to provide detailed
information that can aid you in providing adaptive functionality rather than inferior software. However,
in order to facilitate the usefulness of exceptions within your code, it would help to extend from a decent
functional base exception class, similar to the GenericError class attempted earlier in this chapter.
You ??™ ll now undertake a second attempt to produce a more complete base exception class for use in future
examples in this book, utilizing most of the features you have learned in this chapter.


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