> >Conclusion: use either mechanism, and be consistent. The system error
> >trapping calls won't trap real crash-worthy errors. If you're doing C
code,
> >ErrTry et al looks pretty promising. If you're doing C++, use the
> >compiler's exception handling so the language will handle
> >constructors/destructors correctly.
>
> The biggest problem currently with C++ exceptions is that they rely
> on being able to access global variables, so you can't use them in
> any code that can get called as a result of a sub-launch. An
> interesting tweak would be to modify the Metrowerks exception code to
> use the Palm OS try/catch chain (which is available during a
> sub-launch) as a way around this limitation.
Good point... the exception handling tables are in the code section, not the
data section, but they have to be registered at runtime in a global
variable, which is in the data section. I might look at that code again and
see if it could be modified to use a dynamically-allocated PalmOS feature
memory to hold the table pointer, enabling exceptions in non-global
launches.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/