2015-04-24 91 views

回答

1

在控制檯

110.times do |errno| #there are not more then 110 ERRNO errors 
    puts "#{ errno } => #{ SystemCallError.new(errno).inspect }" 
end 

結果。享受您的調試和代碼挖掘

0 => #<Errno::NOERROR: Undefined error: 0> 
1 => #<Errno::EPERM: Operation not permitted> 
2 => #<Errno::ENOENT: No such file or directory> 
3 => #<Errno::ESRCH: No such process> 
4 => #<Errno::EINTR: Interrupted system call> 
5 => #<Errno::EIO: Input/output error> 
6 => #<Errno::ENXIO: Device not configured> 
7 => #<Errno::E2BIG: Argument list too long> 
8 => #<Errno::ENOEXEC: Exec format error> 
9 => #<Errno::EBADF: Bad file descriptor> 
10 => #<Errno::ECHILD: No child processes> 
11 => #<Errno::EDEADLK: Resource deadlock avoided> 
12 => #<Errno::ENOMEM: Cannot allocate memory> 
13 => #<Errno::EACCES: Permission denied> 
14 => #<Errno::EFAULT: Bad address> 
15 => #<Errno::ENOTBLK: Block device required> 
16 => #<Errno::EBUSY: Resource busy> 
17 => #<Errno::EEXIST: File exists> 
18 => #<Errno::EXDEV: Cross-device link> 
19 => #<Errno::ENODEV: Operation not supported by device> 
20 => #<Errno::ENOTDIR: Not a directory> 
21 => #<Errno::EISDIR: Is a directory> 
22 => #<Errno::EINVAL: Invalid argument> 
23 => #<Errno::ENFILE: Too many open files in system> 
24 => #<Errno::EMFILE: Too many open files> 
25 => #<Errno::ENOTTY: Inappropriate ioctl for device> 
26 => #<Errno::ETXTBSY: Text file busy> 
27 => #<Errno::EFBIG: File too large> 
28 => #<Errno::ENOSPC: No space left on device> 
29 => #<Errno::ESPIPE: Illegal seek> 
30 => #<Errno::EROFS: Read-only file system> 
31 => #<Errno::EMLINK: Too many links> 
32 => #<Errno::EPIPE: Broken pipe> 
33 => #<Errno::EDOM: Numerical argument out of domain> 
34 => #<Errno::ERANGE: Result too large> 
35 => #<Errno::EAGAIN: Resource temporarily unavailable> 
36 => #<Errno::EINPROGRESS: Operation now in progress> 
37 => #<Errno::EALREADY: Operation already in progress> 
38 => #<Errno::ENOTSOCK: Socket operation on non-socket> 
39 => #<Errno::EDESTADDRREQ: Destination address required> 
40 => #<Errno::EMSGSIZE: Message too long> 
41 => #<Errno::EPROTOTYPE: Protocol wrong type for socket> 
42 => #<Errno::ENOPROTOOPT: Protocol not available> 
43 => #<Errno::EPROTONOSUPPORT: Protocol not supported> 
44 => #<Errno::ESOCKTNOSUPPORT: Socket type not supported> 
45 => #<Errno::ENOTSUP: Operation not supported> 
46 => #<Errno::EPFNOSUPPORT: Protocol family not supported> 
47 => #<Errno::EAFNOSUPPORT: Address family not supported by protocol family> 
48 => #<Errno::EADDRINUSE: Address already in use> 
49 => #<Errno::EADDRNOTAVAIL: Can't assign requested address> 
50 => #<Errno::ENETDOWN: Network is down> 
51 => #<Errno::ENETUNREACH: Network is unreachable> 
52 => #<Errno::ENETRESET: Network dropped connection on reset> 
53 => #<Errno::ECONNABORTED: Software caused connection abort> 
54 => #<Errno::ECONNRESET: Connection reset by peer> 
55 => #<Errno::ENOBUFS: No buffer space available> 
56 => #<Errno::EISCONN: Socket is already connected> 
57 => #<Errno::ENOTCONN: Socket is not connected> 
58 => #<Errno::ESHUTDOWN: Can't send after socket shutdown> 
59 => #<Errno::ETOOMANYREFS: Too many references: can't splice> 
60 => #<Errno::ETIMEDOUT: Operation timed out> 
61 => #<Errno::ECONNREFUSED: Connection refused> 
62 => #<Errno::ELOOP: Too many levels of symbolic links> 
63 => #<Errno::ENAMETOOLONG: File name too long> 
64 => #<Errno::EHOSTDOWN: Host is down> 
65 => #<Errno::EHOSTUNREACH: No route to host> 
66 => #<Errno::ENOTEMPTY: Directory not empty> 
67 => #<Errno::EPROCLIM: Too many processes> 
68 => #<Errno::EUSERS: Too many users> 
69 => #<Errno::EDQUOT: Disc quota exceeded> 
70 => #<Errno::ESTALE: Stale NFS file handle> 
71 => #<Errno::EREMOTE: Too many levels of remote in path> 
72 => #<Errno::EBADRPC: RPC struct is bad> 
73 => #<Errno::ERPCMISMATCH: RPC version wrong> 
74 => #<Errno::EPROGUNAVAIL: RPC prog. not avail> 
75 => #<Errno::EPROGMISMATCH: Program version wrong> 
76 => #<Errno::EPROCUNAVAIL: Bad procedure for program> 
77 => #<Errno::ENOLCK: No locks available> 
78 => #<Errno::ENOSYS: Function not implemented> 
79 => #<Errno::EFTYPE: Inappropriate file type or format> 
80 => #<Errno::EAUTH: Authentication error> 
81 => #<Errno::ENEEDAUTH: Need authenticator> 
82 => #<SystemCallError: Device power is off> 
83 => #<SystemCallError: Device error> 
84 => #<Errno::EOVERFLOW: Value too large to be stored in data type> 
85 => #<SystemCallError: Bad executable (or shared library)> 
86 => #<SystemCallError: Bad CPU type in executable> 
87 => #<SystemCallError: Shared library version mismatch> 
88 => #<SystemCallError: Malformed Mach-o file> 
89 => #<Errno::ECANCELED: Operation canceled> 
90 => #<Errno::EIDRM: Identifier removed> 
91 => #<Errno::ENOMSG: No message of desired type> 
92 => #<Errno::EILSEQ: Illegal byte sequence> 
93 => #<Errno::ENOATTR: Attribute not found> 
94 => #<Errno::EBADMSG: Bad message> 
95 => #<Errno::EMULTIHOP: EMULTIHOP (Reserved)> 
96 => #<Errno::ENODATA: No message available on STREAM> 
97 => #<Errno::ENOLINK: ENOLINK (Reserved)> 
98 => #<Errno::ENOSR: No STREAM resources> 
99 => #<Errno::ENOSTR: Not a STREAM> 
100 => #<Errno::EPROTO: Protocol error> 
101 => #<Errno::ETIME: STREAM ioctl timeout> 
102 => #<Errno::EOPNOTSUPP: Operation not supported on socket> 
103 => #<SystemCallError: Policy not found> 
104 => #<Errno::ENOTRECOVERABLE: State not recoverable> 
105 => #<Errno::EOWNERDEAD: Previous owner died> 
106 => #<SystemCallError: Interface output queue is full> 
107 => #<SystemCallError: Unknown error: 107> 
108 => #<SystemCallError: Unknown error: 108> 
109 => #<SystemCallError: Unknown error: 109> 
110 => #<SystemCallError: Unknown error: 110>