State the nature of the terminal error and call ErrFatalDisplay (which puts
up that dialog with the reset button)
Its not very graceful but it seems to be accepted practice for most Palm
apps.
However, your best method of handling terminal errors is to design your app
to avoid them when possible. i.e. Test for the necessary(or guestimated)
memory before entering memory intensive routines - don't allow entry if
memory is too low, can't find the DB - generate it yourself but make sure
your app can handle either 0 records or has a default record to generate.
Now you should be able to handle terminal errors with the standard method
because, hopefully they will almost never occur.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, December 05, 2000 4:49 AM
Subject: Gracefull Exit !!
>
>
>
>
>
> Hi All,
>
> What would be the most gracefull way to Exit...
>
> 1) If you are unable to allocate even small amount of memory using
> MemPtrNew/MemHandleNew ??
>
> 2) If you can't find a database that was there when your application
> started ?? (This cannot happen can it ?)
>
> 3) If a DmWriteCheck failed when it should have been successfull ??
>
> . . .
>
>
>
> e.g., a case where you are processing a crittical part of database and
> suddenly you can't allocate enough space to temporarily copy a
string
> ? You can't just say FrmFa
>
> Thank you in advance,
>
> Prashant Gupta
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/