I would like also add my bit into the discussion. First of all I fully agree with Mathew as far the usefulness of Exceptions is concerned - especially in large projects. (The downside is that the code might be less portable than the old C solutions.)
But, well, I fear that most benefits are limited in the HH world - especially when Palm is concerned. ErrTry/ErrThrow/ErrCatch mechanism represents synchronous exception of the simplest possible type - I would say it basically replaces int error codes. Moreover, there is that strange requirement to use "volatile" keyword. (The sense is clear, but I see it as a kind of obstacle.) Based on Microsoft suggestions, I thoroughly escaped combining longjmp with exceptions in the past. For example I am not sure how the stack based C++ objects will be destroyed. C++ exceptions offer a lot more, but different people say they are not worth of using on Palm because of overhead. My last point are asynchronous exceptions. It's rather a question, because I have no idea about the level of support on Palm. I rather suspect there is no support. (Whereby I would find them extremally useful. ) Jan Slodicka ----- Original Message ----- From: "Ben Combee" <[EMAIL PROTECTED]> > At 20:48 2003-2-7 -0500, you wrote: > >There is an ErrTry, ErrThrow, and ErrCatch mechanism for Palm. See the Palm > >OS API Reference manual for specifics. They work similarly to the C++ > >mechanism, but don't introduce the overhead. > > True, there is little overhead, but you don't get the destructor-calling > benefits of C++ exceptions. This can leave resources stranded if you use > this mechanism with C++ apps. ErrTry/ErrThrow/ErrCatch are basically macro > wrappers around C's setjmp/longjmp library calls. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
