001: package org.python.modules;
002:
003: import org.python.core.*;
004:
005: /**
006: * This file contains autogenerated error codes from:<br/>
007: * <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>
008: *
009: * @author brian zimmer
010: * @version 2.2.1
011: * @copyright 2002 brian zimmer
012: */
013: public final class errno implements ClassDictInit {
014:
015: private errno() {
016: }
017:
018: public static final int EPERM = 1;
019: public static final int ENOENT = 2;
020: public static final int ESRCH = 3;
021: public static final int EINTR = 4;
022: public static final int EIO = 5;
023: public static final int ENXIO = 6;
024: public static final int E2BIG = 7;
025: public static final int ENOEXEC = 8;
026: public static final int EBADF = 9;
027: public static final int ECHILD = 10;
028: public static final int EAGAIN = 11;
029: public static final int EWOULDBLOCK = 11;
030: public static final int ENOMEM = 12;
031: public static final int EACCES = 13;
032: public static final int EFAULT = 14;
033: public static final int ENOTBLK = 15;
034: public static final int EBUSY = 16;
035: public static final int EEXIST = 17;
036: public static final int EXDEV = 18;
037: public static final int ENODEV = 19;
038: public static final int ENOTDIR = 20;
039: public static final int EISDIR = 21;
040: public static final int EINVAL = 22;
041: public static final int ENFILE = 23;
042: public static final int EMFILE = 24;
043: public static final int ENOTTY = 25;
044: public static final int ETXTBSY = 26;
045: public static final int EFBIG = 27;
046: public static final int ENOSPC = 28;
047: public static final int ESPIPE = 29;
048: public static final int EROFS = 30;
049: public static final int EMLINK = 31;
050: public static final int EPIPE = 32;
051: public static final int EDOM = 33;
052: public static final int ERANGE = 34;
053: public static final int EDEADLK = 35;
054: public static final int EDEADLOCK = 35;
055: public static final int ENAMETOOLONG = 36;
056: public static final int ENOLCK = 37;
057: public static final int ENOSYS = 38;
058: public static final int ENOTEMPTY = 39;
059: public static final int ELOOP = 40;
060: public static final int ENOMSG = 42;
061: public static final int EIDRM = 43;
062: public static final int ECHRNG = 44;
063: public static final int EL2NSYNC = 45;
064: public static final int EL3HLT = 46;
065: public static final int EL3RST = 47;
066: public static final int ELNRNG = 48;
067: public static final int EUNATCH = 49;
068: public static final int ENOCSI = 50;
069: public static final int EL2HLT = 51;
070: public static final int EBADE = 52;
071: public static final int EBADR = 53;
072: public static final int EXFULL = 54;
073: public static final int ENOANO = 55;
074: public static final int EBADRQC = 56;
075: public static final int EBADSLT = 57;
076: public static final int EBFONT = 59;
077: public static final int ENOSTR = 60;
078: public static final int ENODATA = 61;
079: public static final int ETIME = 62;
080: public static final int ENOSR = 63;
081: public static final int ENONET = 64;
082: public static final int ENOPKG = 65;
083: public static final int EREMOTE = 66;
084: public static final int ENOLINK = 67;
085: public static final int EADV = 68;
086: public static final int ESRMNT = 69;
087: public static final int ECOMM = 70;
088: public static final int EPROTO = 71;
089: public static final int EMULTIHOP = 72;
090: public static final int EDOTDOT = 73;
091: public static final int EBADMSG = 74;
092: public static final int EOVERFLOW = 75;
093: public static final int ENOTUNIQ = 76;
094: public static final int EBADFD = 77;
095: public static final int EREMCHG = 78;
096: public static final int ELIBACC = 79;
097: public static final int ELIBBAD = 80;
098: public static final int ELIBSCN = 81;
099: public static final int ELIBMAX = 82;
100: public static final int ELIBEXEC = 83;
101: public static final int EILSEQ = 84;
102: public static final int ERESTART = 85;
103: public static final int ESTRPIPE = 86;
104: public static final int EUSERS = 87;
105: public static final int ENOTSOCK = 88;
106: public static final int EDESTADDRREQ = 89;
107: public static final int EMSGSIZE = 90;
108: public static final int EPROTOTYPE = 91;
109: public static final int ENOPROTOOPT = 92;
110: public static final int EPROTONOSUPPORT = 93;
111: public static final int ESOCKTNOSUPPORT = 94;
112: public static final int EOPNOTSUPP = 95;
113: public static final int EPFNOSUPPORT = 96;
114: public static final int EAFNOSUPPORT = 97;
115: public static final int EADDRINUSE = 98;
116: public static final int EADDRNOTAVAIL = 99;
117: public static final int ENETDOWN = 100;
118: public static final int ENETUNREACH = 101;
119: public static final int ENETRESET = 102;
120: public static final int ECONNABORTED = 103;
121: public static final int ECONNRESET = 104;
122: public static final int ENOBUFS = 105;
123: public static final int EISCONN = 106;
124: public static final int ENOTCONN = 107;
125: public static final int ESHUTDOWN = 108;
126: public static final int ETOOMANYREFS = 109;
127: public static final int ETIMEDOUT = 110;
128: public static final int ECONNREFUSED = 111;
129: public static final int EHOSTDOWN = 112;
130: public static final int EHOSTUNREACH = 113;
131: public static final int EALREADY = 114;
132: public static final int EINPROGRESS = 115;
133: public static final int ESTALE = 116;
134: public static final int EUCLEAN = 117;
135: public static final int ENOTNAM = 118;
136: public static final int ENAVAIL = 119;
137: public static final int EISNAM = 120;
138: public static final int EREMOTEIO = 121;
139: public static final int EDQUOT = 122;
140:
141: // AMAK: Starting a new series of jython specific error numbers
142: public static final int ESOCKISBLOCKING = 20000;
143: public static final int EGETADDRINFOFAILED = 20001;
144:
145: public static final PyObject errorcode = new PyDictionary();
146: private static final PyObject strerror = new PyDictionary();
147:
148: public static void classDictInit(PyObject dict)
149: throws PyIgnoreMethodTag {
150: addcode(dict, EPERM, "EPERM", "Operation not permitted");
151: addcode(dict, ENOENT, "ENOENT", "No such file or directory");
152: addcode(dict, ESRCH, "ESRCH", "No such process");
153: addcode(dict, EINTR, "EINTR", "Interrupted system call");
154: addcode(dict, EIO, "EIO", "Input/output error");
155: addcode(dict, ENXIO, "ENXIO", "Device not configured");
156: addcode(dict, E2BIG, "E2BIG", "Argument list too long");
157: addcode(dict, ENOEXEC, "ENOEXEC", "Exec format error");
158: addcode(dict, EBADF, "EBADF", "Bad file descriptor");
159: addcode(dict, ECHILD, "ECHILD", "No child processes");
160: addcode(dict, EAGAIN, "EAGAIN",
161: "Resource temporarily unavailable");
162: addcode(dict, EWOULDBLOCK, "EWOULDBLOCK",
163: "Resource temporarily unavailable");
164: addcode(dict, ENOMEM, "ENOMEM", "Cannot allocate memory");
165: addcode(dict, EACCES, "EACCES", "Permission denied");
166: addcode(dict, EFAULT, "EFAULT", "Bad address");
167: addcode(dict, ENOTBLK, "ENOTBLK", "Block device required");
168: addcode(dict, EBUSY, "EBUSY", "Device or resource busy");
169: addcode(dict, EEXIST, "EEXIST", "File exists");
170: addcode(dict, EXDEV, "EXDEV", "Invalid cross-device link");
171: addcode(dict, ENODEV, "ENODEV", "No such device");
172: addcode(dict, ENOTDIR, "ENOTDIR", "Not a directory");
173: addcode(dict, EISDIR, "EISDIR", "Is a directory");
174: addcode(dict, EINVAL, "EINVAL", "Invalid argument");
175: addcode(dict, ENFILE, "ENFILE", "Too many open files in system");
176: addcode(dict, EMFILE, "EMFILE", "Too many open files");
177: addcode(dict, ENOTTY, "ENOTTY",
178: "Inappropriate ioctl for device");
179: addcode(dict, ETXTBSY, "ETXTBSY", "Text file busy");
180: addcode(dict, EFBIG, "EFBIG", "File too large");
181: addcode(dict, ENOSPC, "ENOSPC", "No space left on device");
182: addcode(dict, ESPIPE, "ESPIPE", "Illegal seek");
183: addcode(dict, EROFS, "EROFS", "Read-only file system");
184: addcode(dict, EMLINK, "EMLINK", "Too many links");
185: addcode(dict, EPIPE, "EPIPE", "Broken pipe");
186: addcode(dict, EDOM, "EDOM", "Numerical argument out of domain");
187: addcode(dict, ERANGE, "ERANGE", "Numerical result out of range");
188: addcode(dict, EDEADLK, "EDEADLK", "Resource deadlock avoided");
189: addcode(dict, EDEADLOCK, "EDEADLOCK",
190: "Resource deadlock avoided");
191: addcode(dict, ENAMETOOLONG, "ENAMETOOLONG",
192: "File name too long");
193: addcode(dict, ENOLCK, "ENOLCK", "No locks available");
194: addcode(dict, ENOSYS, "ENOSYS", "Function not implemented");
195: addcode(dict, ENOTEMPTY, "ENOTEMPTY", "Directory not empty");
196: addcode(dict, ELOOP, "ELOOP",
197: "Too many levels of symbolic links");
198: addcode(dict, ENOMSG, "ENOMSG", "No message of desired type");
199: addcode(dict, EIDRM, "EIDRM", "Identifier removed");
200: addcode(dict, ECHRNG, "ECHRNG", "Channel number out of range");
201: addcode(dict, EL2NSYNC, "EL2NSYNC", "Level 2 not synchronized");
202: addcode(dict, EL3HLT, "EL3HLT", "Level 3 halted");
203: addcode(dict, EL3RST, "EL3RST", "Level 3 reset");
204: addcode(dict, ELNRNG, "ELNRNG", "Link number out of range");
205: addcode(dict, EUNATCH, "EUNATCH",
206: "Protocol driver not attached");
207: addcode(dict, ENOCSI, "ENOCSI", "No CSI structure available");
208: addcode(dict, EL2HLT, "EL2HLT", "Level 2 halted");
209: addcode(dict, EBADE, "EBADE", "Invalid exchange");
210: addcode(dict, EBADR, "EBADR", "Invalid request descriptor");
211: addcode(dict, EXFULL, "EXFULL", "Exchange full");
212: addcode(dict, ENOANO, "ENOANO", "No anode");
213: addcode(dict, EBADRQC, "EBADRQC", "Invalid request code");
214: addcode(dict, EBADSLT, "EBADSLT", "Invalid slot");
215: addcode(dict, EBFONT, "EBFONT", "Bad font file format");
216: addcode(dict, ENOSTR, "ENOSTR", "Device not a stream");
217: addcode(dict, ENODATA, "ENODATA", "No data available");
218: addcode(dict, ETIME, "ETIME", "Timer expired");
219: addcode(dict, ENOSR, "ENOSR", "Out of streams resources");
220: addcode(dict, ENONET, "ENONET", "Machine is not on the network");
221: addcode(dict, ENOPKG, "ENOPKG", "Package not installed");
222: addcode(dict, EREMOTE, "EREMOTE", "Object is remote");
223: addcode(dict, ENOLINK, "ENOLINK", "Link has been severed");
224: addcode(dict, EADV, "EADV", "Advertise error");
225: addcode(dict, ESRMNT, "ESRMNT", "Srmount error");
226: addcode(dict, ECOMM, "ECOMM", "Communication error on send");
227: addcode(dict, EPROTO, "EPROTO", "Protocol error");
228: addcode(dict, EMULTIHOP, "EMULTIHOP", "Multihop attempted");
229: addcode(dict, EDOTDOT, "EDOTDOT", "RFS specific error");
230: addcode(dict, EBADMSG, "EBADMSG", "Bad message");
231: addcode(dict, EOVERFLOW, "EOVERFLOW",
232: "Value too large for defined data type");
233: addcode(dict, ENOTUNIQ, "ENOTUNIQ",
234: "Name not unique on network");
235: addcode(dict, EBADFD, "EBADFD", "File descriptor in bad state");
236: addcode(dict, EREMCHG, "EREMCHG", "Remote address changed");
237: addcode(dict, ELIBACC, "ELIBACC",
238: "Can not access a needed shared library");
239: addcode(dict, ELIBBAD, "ELIBBAD",
240: "Accessing a corrupted shared library");
241: addcode(dict, ELIBSCN, "ELIBSCN",
242: ".lib section in a.out corrupted");
243: addcode(dict, ELIBMAX, "ELIBMAX",
244: "Attempting to link in too many shared libraries");
245: addcode(dict, ELIBEXEC, "ELIBEXEC",
246: "Cannot exec a shared library directly");
247: addcode(dict, EILSEQ, "EILSEQ",
248: "Invalid or incomplete multibyte or wide character");
249: addcode(dict, ERESTART, "ERESTART",
250: "Interrupted system call should be restarted");
251: addcode(dict, ESTRPIPE, "ESTRPIPE", "Streams pipe error");
252: addcode(dict, EUSERS, "EUSERS", "Too many users");
253: addcode(dict, ENOTSOCK, "ENOTSOCK",
254: "Socket operation on non-socket");
255: addcode(dict, EDESTADDRREQ, "EDESTADDRREQ",
256: "Destination address required");
257: addcode(dict, EMSGSIZE, "EMSGSIZE", "Message too long");
258: addcode(dict, EPROTOTYPE, "EPROTOTYPE",
259: "Protocol wrong type for socket");
260: addcode(dict, ENOPROTOOPT, "ENOPROTOOPT",
261: "Protocol not available");
262: addcode(dict, EPROTONOSUPPORT, "EPROTONOSUPPORT",
263: "Protocol not supported");
264: addcode(dict, ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT",
265: "Socket type not supported");
266: addcode(dict, EOPNOTSUPP, "EOPNOTSUPP",
267: "Operation not supported");
268: addcode(dict, EPFNOSUPPORT, "EPFNOSUPPORT",
269: "Protocol family not supported");
270: addcode(dict, EAFNOSUPPORT, "EAFNOSUPPORT",
271: "Address family not supported by protocol");
272: addcode(dict, EADDRINUSE, "EADDRINUSE",
273: "Address already in use");
274: addcode(dict, EADDRNOTAVAIL, "EADDRNOTAVAIL",
275: "Cannot assign requested address");
276: addcode(dict, ENETDOWN, "ENETDOWN", "Network is down");
277: addcode(dict, ENETUNREACH, "ENETUNREACH",
278: "Network is unreachable");
279: addcode(dict, ENETRESET, "ENETRESET",
280: "Network dropped connection on reset");
281: addcode(dict, ECONNABORTED, "ECONNABORTED",
282: "Software caused connection abort");
283: addcode(dict, ECONNRESET, "ECONNRESET",
284: "Connection reset by peer");
285: addcode(dict, ENOBUFS, "ENOBUFS", "No buffer space available");
286: addcode(dict, EISCONN, "EISCONN",
287: "Transport endpoint is already connected");
288: addcode(dict, ENOTCONN, "ENOTCONN",
289: "Transport endpoint is not connected");
290: addcode(dict, ESHUTDOWN, "ESHUTDOWN",
291: "Cannot send after transport endpoint shutdown");
292: addcode(dict, ETOOMANYREFS, "ETOOMANYREFS",
293: "Too many references: cannot splice");
294: addcode(dict, ETIMEDOUT, "ETIMEDOUT", "Connection timed out");
295: addcode(dict, ECONNREFUSED, "ECONNREFUSED",
296: "Connection refused");
297: addcode(dict, EHOSTDOWN, "EHOSTDOWN", "Host is down");
298: addcode(dict, EHOSTUNREACH, "EHOSTUNREACH", "No route to host");
299: addcode(dict, EALREADY, "EALREADY",
300: "Operation already in progress");
301: addcode(dict, EINPROGRESS, "EINPROGRESS",
302: "Operation now in progress");
303: addcode(dict, ESTALE, "ESTALE", "Stale NFS file handle");
304: addcode(dict, EUCLEAN, "EUCLEAN", "Structure needs cleaning");
305: addcode(dict, ENOTNAM, "ENOTNAM", "Not a XENIX named type file");
306: addcode(dict, ENAVAIL, "ENAVAIL",
307: "No XENIX semaphores available");
308: addcode(dict, EISNAM, "EISNAM", "Is a named type file");
309: addcode(dict, EREMOTEIO, "EREMOTEIO", "Remote I/O error");
310: addcode(dict, EDQUOT, "EDQUOT", "Disk quota exceeded");
311:
312: // AMAK: starting a new series of jython specific errors
313: addcode(dict, ESOCKISBLOCKING, "ESOCKISBLOCKING",
314: "Socket is in blocking mode");
315: addcode(dict, EGETADDRINFOFAILED, "EGETADDRINFOFAILED",
316: "getaddrinfo failed");
317: }
318:
319: public static PyObject strerror(PyObject error) {
320: return strerror.__getitem__(error);
321: }
322:
323: private static void addcode(PyObject dict, int errno, String err,
324: String msg) {
325: PyObject errno_o = Py.newInteger(errno);
326: PyObject err_o = Py.newString(err);
327: strerror.__setitem__(errno_o, Py.newString(msg));
328: errorcode.__setitem__(errno_o, err_o);
329: dict.__setitem__(err_o, errno_o);
330: }
331: }
|