"Tilo Christ" <[EMAIL PROTECTED]> wrote in message
news:25338@palm-dev-forum...
> I mean SysFatalAlert(myMessage); SysReset();
> SysFatalAlert shows the message with a button which contains the word
"Reset" in the
> local language of the device. When I tap the button the SysReset does the
rest...
On debug ROMs, SysFatalAlert puts up a dialog with other buttons besides
Reset. You should really check the result that you get back from
SysFatalAlert and act accordingly. The documentation doesn't give details,
but FatalAlert.h has #defines for each of the buttons. I'd use ErrDisplay
instead. What if we add a button to the fatal alert?
> ErrDisplay is not included in release builds where ERROR_CHECK_LEVEL
> == ERROR_CHECK_NONE. I might however write my own macro that
> invokes ErrDisplayFileLineMsg even in release builds.
Our debug ROMs use ERROR_CHECK_FULL. Our release ROMs use
ERROR_CHECK_PARTIAL. We don't use ERROR_CHECK_NONE. You can use whatever
error check level you want in your own applications.
> I am still having lots of situations in my software where I don't know how
to
> continue gracefully, so I guess the ability to come to a screeching halt
will still
> be req'd in my release builds :-(
Absolutely. A few well-placed tests in your release build can make your app
fail more gracefully when it does fail.
> For example, I know I have been told to let the user continue using the
program
> when memory is low, but how could I continue running my game engine, when
it
> cannot allocate the neccessary memory for screen buffers, sprites, etc.
In a game, there's probably not much you can do. But in many applications,
you can simply abort the current operation. For a game, I'd try to do as
much allocation as possible in your AppStart routine so that you don't have
to worry about running out of memory during the game. This can also improve
performance.
--
Danny Epstein
OS Engineer, Palm Inc.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/