Examples of newIOErrorFromException()


Examples of org.jruby.Ruby.newIOErrorFromException()

        try {
            io.getOpenFile().checkReadable(context.getRuntime());
        } catch (PipeException pe) {
            throw runtime.newErrnoEPIPEError();
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

        try {
            io.getOpenFile().checkWritable(context.getRuntime());
        } catch (PipeException pe) {
            throw runtime.newErrnoEPIPEError();
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

            }
        } catch (IOException e) {
            if (runtime.isDebug()) {
                e.printStackTrace();
            }
            throw runtime.newIOErrorFromException(e);
        }

        return runtime.getNil();
    }
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

            }
        } catch (IOException e) {
            if (runtime.isDebug()) {
                e.printStackTrace();
            }
            throw runtime.newIOErrorFromException(e);
        }
    }

    private static void addEntries(ThreadContext context, ZipOutputStream zip, RubyHash entries) throws IOException {
        RubyArray keys = entries.keys().sort(context, Block.NULL_BLOCK);
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

                    // initialize after every readline. Probably not fast, but this is for
                    // interactive terminals anyway...so who cares?
                    try {holder.readline.getTerminal().initializeTerminal();} catch (Exception e) {}
                    continue;
                }
                throw runtime.newIOErrorFromException(ioe);
            } finally {
                holder.readline.getTerminal().enableEcho();
            }
        }
       
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

        runtime.secure(4);
        ConsoleHolder holder = getHolder(runtime);
        try {
            holder.readline.redrawLine(); // not quite the same as rl_refresh_line()
        } catch (IOException ioe) {
            throw runtime.newIOErrorFromException(ioe);
        }
        return runtime.getNil();
    }

    public static class HistoryMethods {
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

        } catch (EOFException e) {
            return runtime.newFixnum(-1);
        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
        } catch (IOException e) {
            throw runtime.newIOErrorFromException(e);
        }
    }
}
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

        Ruby runtime = context.getRuntime();

        try {
            io.getOpenFile().checkReadable(context.getRuntime());
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

        Ruby runtime = context.getRuntime();

        try {
            io.getOpenFile().checkWritable(context.getRuntime());
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
View Full Code Here

Examples of org.jruby.Ruby.newIOErrorFromException()

        } catch (EOFException e) {
            return runtime.newFixnum(-1);
        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
        } catch (IOException e) {
            throw runtime.newIOErrorFromException(e);
        }
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.