sysError values...
Trevor DeVore
lists at mangomultimedia.com
Wed Jan 30 08:57:21 EST 2019
On Wed, Jan 30, 2019 at 7:11 AM Paul Dupuis via use-livecode <
use-livecode at lists.runrev.com> wrote:
>
> But absolutely no mention of where the OSX sysError value comes from.
> For Linux and Windows you can do a targeted search and find information.
> It was easy to find
> https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes
> (even if there is 15999 codes!)
>
I think that sysError() on macOS is just returning the OSErr or OSStatus
codes returned by macOS API calls. I found this document on error handling
which is informative:
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorObjectsDomains/ErrorObjectsDomains.html#//apple_ref/doc/uid/TP40001806-CH202-CJBGAIBJ
While the document discusses NSError (Cocoa) it does bring up the concept
of domains. In Listing 1-1 it lists the POSIX domain errors with "13" being
a "Permission Denied" error. Table 1-1 lists the various domains with
information on which header files contain the error codes. I searched the
non-Cocoa headers on opensource.apple.com and found these urls:
https://opensource.apple.com/source/xnu/xnu-792/osfmk/mach/kern_return.h
https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/sys/errno.h.auto.html
https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h
--
Trevor DeVore
ScreenSteps
www.screensteps.com
More information about the use-livecode
mailing list