Package com.kenai.constantine.platform

Examples of com.kenai.constantine.platform.Errno


            return newSystemCallError("Unknown Error (" + errno + ") - " + message);
        }
    }

    public RaiseException newErrnoFromInt(int errno) {
        Errno errnoObj = Errno.valueOf(errno);
        if (errnoObj == null) {
            return newSystemCallError("Unknown Error (" + errno + ")");
        }
        String message = errnoObj.description();
        return newErrnoFromInt(errno, message);
    }
View Full Code Here


    public static void checkErrno(Ruby runtime, int result) {
        if (result < 0) {
        // FIXME: The error message is a bit off.
        // e.g., No such process - No such process (Errno::ESRCH)
        // Note the repetition of 'No such process'.
            Errno errno = Errno.valueOf(runtime.getPosix().errno());
            String name = errno.name();
            String msg  = errno.toString();
            RubyClass errnoClass = runtime.getErrno().fastGetClass(name);
            if (errnoClass != null) {
                throw new RaiseException(runtime, errnoClass, msg, true);
            }
        }
View Full Code Here

TOP

Related Classes of com.kenai.constantine.platform.Errno

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.