It did happen to me several time with my bloody codes.

One example is easy to reproduce: Pass 0xFFFFFFFF to the uniqueID.  It will
give out fatal says" DataMgr.c, line 6184, invalid uniqueID passwd"

I have to admit that it does help me debug my problem.  If that returns not
found, I would not be able to figure out what's going on quickly.  But, still,
if I check the return value and I see it is "not found" and I am sure that it
should be there, I would check the uniqueID I passed.

Can someone from PalmOS tell me that the fatal only happens when the uniqueID I
passed blows the 3 byte bounds?

Thanks.

Max
--- Danny Epstein <[EMAIL PROTECTED]> wrote:
> Looking at the source code for Palm OS 1.0 through 4.1, it looks like
> DmFindRecordByID just returns an error code without any fatal or non-fatal
> alerts. I'm not sure why the docs say "May
> display a fatal error message if the unique ID is invalid." Maybe I missed
> something. Has anyone actually seen an alert when using this function? The
> only alerts I can see are used in "but this can never happen" situations.
> 
> It appears that this is a documentation bug. I don't think we included that
> note in the docs to allow us to add a fatal or non-fatal alert later. I
> suspect the note is intended for another function, that did have a non-fatal
> alert at one point.
> 
> Having DmFindRecordByID pass back dmMaxRecordIndex (0xFFFF) via the indexP
> parameter when it returns the dmErrUniqueIDNotFound error code, is an
> interesting idea. This record number is almost certainly illegal. It would
> cause a subsequent call to DmQueryRecord to return zero. A subsequent call
> to DmGetRecord would put up an alert on debug ROMs as well. In either case,
> the zero would probably be passed into MemHandleLock, which would put up an
> alert on release ROMs as well.
> -
> Danny
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/tech/support/forums/


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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

Reply via email to