KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > modules > errno


1 package org.python.modules;
2
3 import org.python.core.*;
4
5 /**
6  * This file contains autogenerated error codes from:<br/>
7  * <b>Python 2.2.1 (#5, Oct 7 2002, 09:20:38) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-97)]</b>
8  *
9  * @author brian zimmer
10  * @version 2.2.1
11  * @copyright 2002 brian zimmer
12  */

13 public final class errno implements ClassDictInit {
14
15     private errno() {}
16
17     public static final int EPERM = 1;
18     public static final int ENOENT = 2;
19     public static final int ESRCH = 3;
20     public static final int EINTR = 4;
21     public static final int EIO = 5;
22     public static final int ENXIO = 6;
23     public static final int E2BIG = 7;
24     public static final int ENOEXEC = 8;
25     public static final int EBADF = 9;
26     public static final int ECHILD = 10;
27     public static final int EAGAIN = 11;
28     public static final int EWOULDBLOCK = 11;
29     public static final int ENOMEM = 12;
30     public static final int EACCES = 13;
31     public static final int EFAULT = 14;
32     public static final int ENOTBLK = 15;
33     public static final int EBUSY = 16;
34     public static final int EEXIST = 17;
35     public static final int EXDEV = 18;
36     public static final int ENODEV = 19;
37     public static final int ENOTDIR = 20;
38     public static final int EISDIR = 21;
39     public static final int EINVAL = 22;
40     public static final int ENFILE = 23;
41     public static final int EMFILE = 24;
42     public static final int ENOTTY = 25;
43     public static final int ETXTBSY = 26;
44     public static final int EFBIG = 27;
45     public static final int ENOSPC = 28;
46     public static final int ESPIPE = 29;
47     public static final int EROFS = 30;
48     public static final int EMLINK = 31;
49     public static final int EPIPE = 32;
50     public static final int EDOM = 33;
51     public static final int ERANGE = 34;
52     public static final int EDEADLK = 35;
53     public static final int EDEADLOCK = 35;
54     public static final int ENAMETOOLONG = 36;
55     public static final int ENOLCK = 37;
56     public static final int ENOSYS = 38;
57     public static final int ENOTEMPTY = 39;
58     public static final int ELOOP = 40;
59     public static final int ENOMSG = 42;
60     public static final int EIDRM = 43;
61     public static final int ECHRNG = 44;
62     public static final int EL2NSYNC = 45;
63     public static final int EL3HLT = 46;
64     public static final int EL3RST = 47;
65     public static final int ELNRNG = 48;
66     public static final int EUNATCH = 49;
67     public static final int ENOCSI = 50;
68     public static final int EL2HLT = 51;
69     public static final int EBADE = 52;
70     public static final int EBADR = 53;
71     public static final int EXFULL = 54;
72     public static final int ENOANO = 55;
73     public static final int EBADRQC = 56;
74     public static final int EBADSLT = 57;
75     public static final int EBFONT = 59;
76     public static final int ENOSTR = 60;
77     public static final int ENODATA = 61;
78     public static final int ETIME = 62;
79     public static final int ENOSR = 63;
80     public static final int ENONET = 64;
81     public static final int ENOPKG = 65;
82     public static final int EREMOTE = 66;
83     public static final int ENOLINK = 67;
84     public static final int EADV = 68;
85     public static final int ESRMNT = 69;
86     public static final int ECOMM = 70;
87     public static final int EPROTO = 71;
88     public static final int EMULTIHOP = 72;
89     public static final int EDOTDOT = 73;
90     public static final int EBADMSG = 74;
91     public static final int EOVERFLOW = 75;
92     public static final int ENOTUNIQ = 76;
93     public static final int EBADFD = 77;
94     public static final int EREMCHG = 78;
95     public static final int ELIBACC = 79;
96     public static final int ELIBBAD = 80;
97     public static final int ELIBSCN = 81;
98     public static final int ELIBMAX = 82;
99     public static final int ELIBEXEC = 83;
100     public static final int EILSEQ = 84;
101     public static final int ERESTART = 85;
102     public static final int ESTRPIPE = 86;
103     public static final int EUSERS = 87;
104     public static final int ENOTSOCK = 88;
105     public static final int EDESTADDRREQ = 89;
106     public static final int EMSGSIZE = 90;
107     public static final int EPROTOTYPE = 91;
108     public static final int ENOPROTOOPT = 92;
109     public static final int EPROTONOSUPPORT = 93;
110     public static final int ESOCKTNOSUPPORT = 94;
111     public static final int EOPNOTSUPP = 95;
112     public static final int EPFNOSUPPORT = 96;
113     public static final int EAFNOSUPPORT = 97;
114     public static final int EADDRINUSE = 98;
115     public static final int EADDRNOTAVAIL = 99;
116     public static final int ENETDOWN = 100;
117     public static final int ENETUNREACH = 101;
118     public static final int ENETRESET = 102;
119     public static final int ECONNABORTED = 103;
120     public static final int ECONNRESET = 104;
121     public static final int ENOBUFS = 105;
122     public static final int EISCONN = 106;
123     public static final int ENOTCONN = 107;
124     public static final int ESHUTDOWN = 108;
125     public static final int ETOOMANYREFS = 109;
126     public static final int ETIMEDOUT = 110;
127     public static final int ECONNREFUSED = 111;
128     public static final int EHOSTDOWN = 112;
129     public static final int EHOSTUNREACH = 113;
130     public static final int EALREADY = 114;
131     public static final int EINPROGRESS = 115;
132     public static final int ESTALE = 116;
133     public static final int EUCLEAN = 117;
134     public static final int ENOTNAM = 118;
135     public static final int ENAVAIL = 119;
136     public static final int EISNAM = 120;
137     public static final int EREMOTEIO = 121;
138     public static final int EDQUOT = 122;
139
140     public static final PyObject errorcode = new PyDictionary();
141     private static final PyObject strerror = new PyDictionary();
142
143     public static void classDictInit(PyObject dict) throws PyIgnoreMethodTag {
144         addcode(dict, EPERM, "EPERM", "Operation not permitted");
145         addcode(dict, ENOENT, "ENOENT", "No such file or directory");
146         addcode(dict, ESRCH, "ESRCH", "No such process");
147         addcode(dict, EINTR, "EINTR", "Interrupted system call");
148         addcode(dict, EIO, "EIO", "Input/output error");
149         addcode(dict, ENXIO, "ENXIO", "Device not configured");
150         addcode(dict, E2BIG, "E2BIG", "Argument list too long");
151         addcode(dict, ENOEXEC, "ENOEXEC", "Exec format error");
152         addcode(dict, EBADF, "EBADF", "Bad file descriptor");
153         addcode(dict, ECHILD, "ECHILD", "No child processes");
154         addcode(dict, EAGAIN, "EAGAIN", "Resource temporarily unavailable");
155         addcode(dict, EWOULDBLOCK, "EWOULDBLOCK", "Resource temporarily unavailable");
156         addcode(dict, ENOMEM, "ENOMEM", "Cannot allocate memory");
157         addcode(dict, EACCES, "EACCES", "Permission denied");
158         addcode(dict, EFAULT, "EFAULT", "Bad address");
159         addcode(dict, ENOTBLK, "ENOTBLK", "Block device required");
160         addcode(dict, EBUSY, "EBUSY", "Device or resource busy");
161         addcode(dict, EEXIST, "EEXIST", "File exists");
162         addcode(dict, EXDEV, "EXDEV", "Invalid cross-device link");
163         addcode(dict, ENODEV, "ENODEV", "No such device");
164         addcode(dict, ENOTDIR, "ENOTDIR", "Not a directory");
165         addcode(dict, EISDIR, "EISDIR", "Is a directory");
166         addcode(dict, EINVAL, "EINVAL", "Invalid argument");
167         addcode(dict, ENFILE, "ENFILE", "Too many open files in system");
168         addcode(dict, EMFILE, "EMFILE", "Too many open files");
169         addcode(dict, ENOTTY, "ENOTTY", "Inappropriate ioctl for device");
170         addcode(dict, ETXTBSY, "ETXTBSY", "Text file busy");
171         addcode(dict, EFBIG, "EFBIG", "File too large");
172         addcode(dict, ENOSPC, "ENOSPC", "No space left on device");
173         addcode(dict, ESPIPE, "ESPIPE", "Illegal seek");
174         addcode(dict, EROFS, "EROFS", "Read-only file system");
175         addcode(dict, EMLINK, "EMLINK", "Too many links");
176         addcode(dict, EPIPE, "EPIPE", "Broken pipe");
177         addcode(dict, EDOM, "EDOM", "Numerical argument out of domain");
178         addcode(dict, ERANGE, "ERANGE", "Numerical result out of range");
179         addcode(dict, EDEADLK, "EDEADLK", "Resource deadlock avoided");
180         addcode(dict, EDEADLOCK, "EDEADLOCK", "Resource deadlock avoided");
181         addcode(dict, ENAMETOOLONG, "ENAMETOOLONG", "File name too long");
182         addcode(dict, ENOLCK, "ENOLCK", "No locks available");
183         addcode(dict, ENOSYS, "ENOSYS", "Function not implemented");
184         addcode(dict, ENOTEMPTY, "ENOTEMPTY", "Directory not empty");
185         addcode(dict, ELOOP, "ELOOP", "Too many levels of symbolic links");
186         addcode(dict, ENOMSG, "ENOMSG", "No message of desired type");
187         addcode(dict, EIDRM, "EIDRM", "Identifier removed");
188         addcode(dict, ECHRNG, "ECHRNG", "Channel number out of range");
189         addcode(dict, EL2NSYNC, "EL2NSYNC", "Level 2 not synchronized");
190         addcode(dict, EL3HLT, "EL3HLT", "Level 3 halted");
191         addcode(dict, EL3RST, "EL3RST", "Level 3 reset");
192         addcode(dict, ELNRNG, "ELNRNG", "Link number out of range");
193         addcode(dict, EUNATCH, "EUNATCH", "Protocol driver not attached");
194         addcode(dict, ENOCSI, "ENOCSI", "No CSI structure available");
195         addcode(dict, EL2HLT, "EL2HLT", "Level 2 halted");
196         addcode(dict, EBADE, "EBADE", "Invalid exchange");
197         addcode(dict, EBADR, "EBADR", "Invalid request descriptor");
198         addcode(dict, EXFULL, "EXFULL", "Exchange full");
199         addcode(dict, ENOANO, "ENOANO", "No anode");
200         addcode(dict, EBADRQC, "EBADRQC", "Invalid request code");
201         addcode(dict, EBADSLT, "EBADSLT", "Invalid slot");
202         addcode(dict, EBFONT, "EBFONT", "Bad font file format");
203         addcode(dict, ENOSTR, "ENOSTR", "Device not a stream");
204         addcode(dict, ENODATA, "ENODATA", "No data available");
205         addcode(dict, ETIME, "ETIME", "Timer expired");
206         addcode(dict, ENOSR, "ENOSR", "Out of streams resources");
207         addcode(dict, ENONET, "ENONET", "Machine is not on the network");
208         addcode(dict, ENOPKG, "ENOPKG", "Package not installed");
209         addcode(dict, EREMOTE, "EREMOTE", "Object is remote");
210         addcode(dict, ENOLINK, "ENOLINK", "Link has been severed");
211         addcode(dict, EADV, "EADV", "Advertise error");
212         addcode(dict, ESRMNT, "ESRMNT", "Srmount error");
213         addcode(dict, ECOMM, "ECOMM", "Communication error on send");
214         addcode(dict, EPROTO, "EPROTO", "Protocol error");
215         addcode(dict, EMULTIHOP, "EMULTIHOP", "Multihop attempted");
216         addcode(dict, EDOTDOT, "EDOTDOT", "RFS specific error");
217         addcode(dict, EBADMSG, "EBADMSG", "Bad message");
218         addcode(dict, EOVERFLOW, "EOVERFLOW", "Value too large for defined data type");
219         addcode(dict, ENOTUNIQ, "ENOTUNIQ", "Name not unique on network");
220         addcode(dict, EBADFD, "EBADFD", "File descriptor in bad state");
221         addcode(dict, EREMCHG, "EREMCHG", "Remote address changed");
222         addcode(dict, ELIBACC, "ELIBACC", "Can not access a needed shared library");
223         addcode(dict, ELIBBAD, "ELIBBAD", "Accessing a corrupted shared library");
224         addcode(dict, ELIBSCN, "ELIBSCN", ".lib section in a.out corrupted");
225         addcode(dict, ELIBMAX, "ELIBMAX", "Attempting to link in too many shared libraries");
226         addcode(dict, ELIBEXEC, "ELIBEXEC", "Cannot exec a shared library directly");
227         addcode(dict, EILSEQ, "EILSEQ", "Invalid or incomplete multibyte or wide character");
228         addcode(dict, ERESTART, "ERESTART", "Interrupted system call should be restarted");
229         addcode(dict, ESTRPIPE, "ESTRPIPE", "Streams pipe error");
230         addcode(dict, EUSERS, "EUSERS", "Too many users");
231         addcode(dict, ENOTSOCK, "ENOTSOCK", "Socket operation on non-socket");
232         addcode(dict, EDESTADDRREQ, "EDESTADDRREQ", "Destination address required");
233         addcode(dict, EMSGSIZE, "EMSGSIZE", "Message too long");
234         addcode(dict, EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket");
235         addcode(dict, ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available");
236         addcode(dict, EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported");
237         addcode(dict, ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT", "Socket type not supported");
238         addcode(dict, EOPNOTSUPP, "EOPNOTSUPP", "Operation not supported");
239         addcode(dict, EPFNOSUPPORT, "EPFNOSUPPORT", "Protocol family not supported");
240         addcode(dict, EAFNOSUPPORT, "EAFNOSUPPORT", "Address family not supported by protocol");
241         addcode(dict, EADDRINUSE, "EADDRINUSE", "Address already in use");
242         addcode(dict, EADDRNOTAVAIL, "EADDRNOTAVAIL", "Cannot assign requested address");
243         addcode(dict, ENETDOWN, "ENETDOWN", "Network is down");
244         addcode(dict, ENETUNREACH, "ENETUNREACH", "Network is unreachable");
245         addcode(dict, ENETRESET, "ENETRESET", "Network dropped connection on reset");
246         addcode(dict, ECONNABORTED, "ECONNABORTED", "Software caused connection abort");
247         addcode(dict, ECONNRESET, "ECONNRESET", "Connection reset by peer");
248         addcode(dict, ENOBUFS, "ENOBUFS", "No buffer space available");
249         addcode(dict, EISCONN, "EISCONN", "Transport endpoint is already connected");
250         addcode(dict, ENOTCONN, "ENOTCONN", "Transport endpoint is not connected");
251         addcode(dict, ESHUTDOWN, "ESHUTDOWN", "Cannot send after transport endpoint shutdown");
252         addcode(dict, ETOOMANYREFS, "ETOOMANYREFS", "Too many references: cannot splice");
253         addcode(dict, ETIMEDOUT, "ETIMEDOUT", "Connection timed out");
254         addcode(dict, ECONNREFUSED, "ECONNREFUSED", "Connection refused");
255         addcode(dict, EHOSTDOWN, "EHOSTDOWN", "Host is down");
256         addcode(dict, EHOSTUNREACH, "EHOSTUNREACH", "No route to host");
257         addcode(dict, EALREADY, "EALREADY", "Operation already in progress");
258         addcode(dict, EINPROGRESS, "EINPROGRESS", "Operation now in progress");
259         addcode(dict, ESTALE, "ESTALE", "Stale NFS file handle");
260         addcode(dict, EUCLEAN, "EUCLEAN", "Structure needs cleaning");
261         addcode(dict, ENOTNAM, "ENOTNAM", "Not a XENIX named type file");
262         addcode(dict, ENAVAIL, "ENAVAIL", "No XENIX semaphores available");
263         addcode(dict, EISNAM, "EISNAM", "Is a named type file");
264         addcode(dict, EREMOTEIO, "EREMOTEIO", "Remote I/O error");
265         addcode(dict, EDQUOT, "EDQUOT", "Disk quota exceeded");
266
267     }
268
269     public static PyObject strerror(PyObject error) {
270         return strerror.__getitem__(error);
271     }
272
273     private static void addcode(PyObject dict, int errno,
274                                 String JavaDoc err, String JavaDoc msg) {
275         PyObject errno_o = Py.newInteger(errno);
276         PyObject err_o = Py.newString(err);
277         strerror.__setitem__(errno_o, Py.newString(msg));
278         errorcode.__setitem__(errno_o, err_o);
279         dict.__setitem__(err_o, errno_o);
280     }
281 }
282
Popular Tags