Not found error

Jan-Jaap van der Geer janjaap at dsv.nl
Sun Jan 12 15:34:24 GMT 2003


Tony van der Hoff <tony at mk-net.demon.co.uk> wrote:
> On 12 Jan 2003, in message <ae39abb34b.Jan-Jaap at c2i.net>,
> Jan-Jaap van der Geer <janjaap at dsv.nl> wrote:
> > Is the error just not defined? Is there a better way of finding
> > a match between the error and the constant defined for it in
> > OSLib?

> I would use Steve Fryatt's !Locate utility to search the OSLib.h
> directory for the number. In this case (0x117D6) appears to be
> not defined in OSLib, not surprisingly, if you read on...

Good idea, I'll do that...
 
> The error codes in RISC OS are, IMHO, a mess, but it's what we're
> stuck with. If you refer to the PRM (1-42), you'll see that the
> low byte is a 'basic error number'; the middle two bytes indicate
> which part of the OS generated the error; and the top byte
> contains flags.

Are there any constants defined in OSLib to tell me which part is
used for what or shall I just hardcode that? I cannot find it in
the fileswitch part. !Locate on 0xff00 didn't reveal anything
usefull either.
 
> However, in the case of the 01XXYY group, XX indicates the filing
> system number. FS 0x17 is defined (in ileswitch.h) to be RAMFS,
> so 117D6 is "File not found in RAMFS".

That sounds right... I did my little test there so... :-)

> OSLib does its best to define (in os.h) all the basic 0XX error
> numbers; and does quite a good job of defining the XXX error
> codes, but beyond that it gets a bit lost, because of the
> profusion of error codes, most of which don't appear in the
> documentation.

I can see that's a problem... :-(
 
> Depending upon what you're trying to achieve you'll need to
> programmatically break down the returned error code, and analyse
> it appropriately. I would have hoped for an OS routine to handle
> this, but, again, no...

I'll check if it is a 0x1xxD6 error, that'll do. I would appreciate
a constant to map out the FS-error, but I guess I'll have to do
without it.

Thanks a lot for your help!!

Cheers,
Jan-Jaap



More information about the oslib-user mailing list