> Well, first you have to define "it"--i.e., what are the benefits of
> exceptions? To my mind, exceptions are designed for situations where the


(possibly more on topic in a C/C++ group?, sorry if so)

On the desktop, I use exceptions for all errors and assertions.

* You'll never forget to check a return code of a function.  If a function
errors, it throws an exception.
* Instead of error handling code sprinkled througout the code, you add the
error handling code where it's appropriate, separated from the code that
generated it.
* Allows you to handle an entire class of errors with the same code.
* lets a method defer the handling of its errors to a method higher up on
the call stack.
* no cryptic integer return codes

I'm sure there's plenty of web sites that can enumerate the benefits of
exception handling better than I can.

Again, I have some big apps here.  The bigger the app, the more I want to
use exception handling throughout for it's benefits.  But possibly, the
bigger the app, the greater the possibility that the overhead of exception
handling will push the Palm to its limits?  The first segment of my app is
already pretty tight.

"Mark Wilden" <[EMAIL PROTECTED]> wrote in message
news:112563@palm-dev-forum...
>
> From: "Matthew Henry" <[EMAIL PROTECTED]>
>
> > I've been coding in C++ forever, so obviously I'd prefer extensive
> exception
> > handling.
> > But perhaps on the Palm it's just not worth it?
>
> Well, first you have to define "it"--i.e., what are the benefits of
> exceptions? To my mind, exceptions are designed for situations where the
> generator of the error doesn't know what to do about it. So it "throws" up
> its hands and casts the problem to the wind.
>
> My Palm apps are typically so tiny that the generator of the error (or at
> least its caller) does in fact know what to do about errors, so the main
> benefit of exceptions is lost.
>
>
>



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

Reply via email to