Paul Nevai wrote:
>
> I wonder if I am alone and if I am overdoing it when I use the
> ErrFatalDisplayIf () stuff below.
As Aaaron suggested, I'd only display Fatal Dialogs in the debug versions
of my apps. You could either surround the calls to ErrFatalDisplayIf with
#ifndef NDEBUG / #endif or use a macro that expands to ErrFatalDisplayIf if
NDEBUG isn't defined.
> Would most professionals simply go ahead w/o any error checking?
I'm not most professionals, but I certainly do as much error checking as
you do in your snippet.
I don't do it the way you do it, however, because I have troubles finding
out what the purpose of the code is if it is interleaved with so much
checking. I prefer using helpers like a HandleLock template that prevents
me from casting (in C++, you can't cast from void * to Char * implicitly),
that does the error checking (if it isn't opted out) and that implicitly
unlocks the handle when the lock object goes out of scope.
> Is there a gentler way of doing the error checking?
As I described: If you use C++ classes and templates, you have several
possibilities to make both error checking easier and the code easier to
read.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/