At 04:16 AM 8/31/2006, you wrote:
Subject: Re: Errtry and ErrCatch
From: "Bharathi Kumaraswamy" <[EMAIL PROTECTED]>
Date: Thu, 31 Aug 2006 04:40:49 -0000
X-Message-Number: 23
Thanks for your reply. I am using C language and I need to get all
the exceptions.
This is my code:
ErrTry
{
CityIDdb = DmOpenDatabase(0,dbID,dmModeReadOnly);
if(CityIDdb==0)
{
ErrThrow(dmErrCantOpen);
}
}
ErrCatch(error)
{
return;
}
ErrEndCatch
If any exception occurs during DmOpendatabase function, I have to
catch it. But how can i do that? I dont want to throw particular
exception. Please help me in this issue.
Your code sample doesn't justify using exceptions.
Best advise if not to!
You can use C++ on Palm OS, but there are some features that should
be avoided in large programs, such as RTTI, exceptions, virtual functions.
The other argument against exceptions is your code should be written
to handle anything that goes wrong, as it goes wrong, and take
appropriate action.
IMHO exceptions tend to encourage poor programming which assumes
everything works and then throws any failures into a big bucket.
Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/