As far as I know, no function in Palm SDK will ever throw exceptions... all errors are signaled by special return values. After that, feel free to throw / catch exceptions based on those return values.
Jerome

Bharathi Kumaraswamy wrote:
But when can I use ErrTry and ErrCatch statements? Can I use it for memory functions?

Thanks
Bharathi

Gary wrote:

DmOpenDatabase won't ever throw an error. If it returns 0, you can use DmGetLastErr() to figure out what went wrong. You can then throw/catch that error if you like.

-Gary

Bharathi Kumaraswamy wrote:

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.

Thanks in advance
Bharathi






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

Reply via email to