From: Richard Coutts [mailto:[EMAIL PROTECTED]]
>    ErrTry {
>       int inf = something / zero;
>    } ErrCatch (error) {
>       FrmCustomAlert(WarningDialogAlert, "Error Caught", "", "");
>    }
>    ErrEndCatch;
> I get a "fatal exception" error from the above code.
> How do I get the system to throw the fatal exceptions it catches?

You can't.  The Error Manager macros, C++ exception handling, and low level
exceptions such as divide by zero, are all mutually exclusive.  ErrCatch
catches only exceptions thrown by ErrThrow in your own code.  The OS doesn't
throw any such exceptions out of API calls, nor does it throw them upon any
processor exceptions such as the divide by zero shown here, AFAIK.

If you still want nice exception handling at least within your own code,
then consider using C++ exceptions rather than the C API macros.  You get
control of object destruction and resource deallocation that way.

-slj-



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to