The Pedigree Project  0.1
errors.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef ERRORS_H
21 #define ERRORS_H
22 
23 // This namespace is mapped to posix errno's where possible. Keep it that way!
24 namespace Error
25 {
26 enum PosixError
27 {
28  NoError = 0,
29  NotEnoughPermissions = 1, // EPERM
30  DoesNotExist = 2, // ENOENT
31  NoSuchProcess = 3, // ESRCH
32  Interrupted = 4, // EINTR
33  IoError = 5, // EIO
34  NoSuchDevice = 6, // ENXIO
35  TooBig = 7, // E2BIG
36  ExecFormatError = 8, // ENOEXEC
37  BadFileDescriptor = 9, // EBADF
38  NoChildren = 10, // ECHILD
39  NoMoreProcesses = 11, // EAGAIN
40  OutOfMemory = 12, // ENOMEM
41  PermissionDenied = 13, // EACCES
42  BadAddress = 14, // EFAULT
43  DeviceBusy = 16, // EBUSY
44  FileExists = 17, // EEXIST
45  CrossDeviceLink = 18, // EXDEV
46  DeviceDoesNotExist = 19, // ENODEV
47  NotADirectory = 20, // ENOTDIR
48  IsADirectory = 21, // EISDIR
49  InvalidArgument = 22, // EINVAL
50  TooManyOpenFiles = 23, // ENFILE
51  NotAConsole = 25, // ENOTTY
52  FileTooLarge = 27, // EFBIG
53  NoSpaceLeftOnDevice = 28, // ENOSPC
54  IllegalSeek = 29, // ESPIPE (??)
55  ReadOnlyFilesystem = 30, // EROFS
56  BrokenPipe = 32, // EPIPE
57  BadRange = 34, // ERANGE
58  Deadlock = 35, // EDEADLK
59  NameTooLong = 36, // ENAMETOOLONG
60  Unimplemented = 38, // ENOSYS
61  NotEmpty = 39, // ENOTEMPTY
62  LoopExists = 40, // ELOOP
63  ProtocolNotAvailable = 92, // ENOPROTOOPT
64  OperationNotSupported = 95, // ENOTSUP
65  ConnectionAborted = 103, // ECONNABORTED
66  ConnectionReset = 104, // ECONNRESET
67  NoMoreBuffers = 105, // ENOBUFS
68  IsConnected = 106, // EISCONN
69  NotConnected = 107, // ENOTCONN
70  TimedOut = 110, // ETIMEDOUT
71  ConnectionRefused = 111, // ECONNREFUSED
72  HostUnreachable = 113, // EHOSTUNREACH
73  Already = 114, // EALREADY
74  InProgress = 115, // EINPROGRESS
75 };
76 }
77 
78 #endif
Definition: errors.h:24