/** * Address already in use */ public static int EADDRINUSE() { return Errno.EADDRINUSE.intValue(); }
/** * Device or resource busy */ public static int EBUSY() { return Errno.EBUSY.intValue(); }
/** * Connection refused */ public static int ECONNREFUSED() { return Errno.ECONNREFUSED.intValue(); }
/** * File too large */ public static int EFBIG() { return Errno.EFBIG.intValue(); }
/** * No route to host */ public static int EHOSTUNREACH() { return Errno.EHOSTUNREACH.intValue(); }
/** * Illegal byte sequence */ public static int EILSEQ() { return Errno.EILSEQ.intValue(); }
/** * Too many symbolic links encountered */ public static int ELOOP() { return Errno.ELOOP.intValue(); }
/** * No buffer space available */ public static int ENOBUFS() { return Errno.ENOBUFS.intValue(); }
/** * No record locks available */ public static int ENOLCK() { return Errno.ENOLCK.intValue(); }
/** * Out of memory */ public static int ENOMEM() { return Errno.ENOMEM.intValue(); }
/** * Out of streams resources */ public static int ENOSR() { return Errno.ENOSR.intValue(); }
/** * Protocol wrong type for socket */ public static int EPROTOTYPE() { return Errno.EPROTOTYPE.intValue(); }
/** * Cannot send after transport endpoint shutdown */ public static int ESHUTDOWN() { return Errno.ESHUTDOWN.intValue(); }
/** * No such process */ public static int ESRCH() { return Errno.ESRCH.intValue(); }
/** * Stale file handle */ public static int ESTALE() { return Errno.ESTALE.intValue(); }
public long sysconf(Sysconf name) { switch (name) { case _SC_CLK_TCK: return JavaTimes.HZ; default: errno(Errno.EOPNOTSUPP.intValue()); return -1; } }
public RaiseException newErrnoFromInt(int errno, String methodName, String message) { if (Platform.IS_WINDOWS && ("stat".equals(methodName) || "lstat".equals(methodName))) { if (errno == 20047) return newErrnoENOENTError(message); // boo:bar UNC stat failure if (errno == Errno.ESRCH.intValue()) return newErrnoENOENTError(message); // ESRCH on stating "" } return newErrnoFromInt(errno, message); }
public RaiseException newErrnoFromErrno(Errno errno, String message) { if (errno == null || errno == Errno.__UNKNOWN_CONSTANT__) { return newSystemCallError(message); } return newErrnoFromInt(errno.intValue(), message); }
public RaiseException newErrnoFromInt(int errno, String methodName, String message) { if (Platform.IS_WINDOWS && ("stat".equals(methodName) || "lstat".equals(methodName))) { if (errno == 20047) return newErrnoENOENTError(message); // boo:bar UNC stat failure if (errno == Errno.ESRCH.intValue()) return newErrnoENOENTError(message); // ESRCH on stating "" } return newErrnoFromInt(errno, message); }
private static PyException fromIOException(IOException ioe, PyObject err) { String message = ioe.getMessage(); if (message == null) { message = ioe.getClass().getName(); } if (ioe instanceof FileNotFoundException) { PyTuple args = new PyTuple(Py.newInteger(Errno.ENOENT.intValue()), Py.newString("File not found - " + message)); return new PyException(err, args); } return new PyException(err, message); }