# System error codes

Some classes, including `FolderItem</api/files/folderitem>`, `IOException</api/exceptions/ioexception>`, `TCPSocket</api/networking/tcpsocket>`, `IPCSocket</api/networking/ipcsocket>`, etc., use system error codes in addition to internally-defined codes.

## macOS

Negative error codes come from the Mac OS frameworks. Most, but not all, Mac OS error codes can be found in a C header file named MacErrors.h. This file is most likely at /System/Library/Frameworks/CoreServices.framework /Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h.

Positive error codes are usually BSD error codes. A list of these codes along with cryptic descriptions can be found in a C header file named errno.h. There are usually several files with this name on a Mac OS system; the one you want is probably /usr/include/sys/errno.h.

## Windows

Windows system error codes can be found at [here](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes).
