public static RaiseException from(Ruby runtime, RubyClass excptnClass, String msg) { return RubyException.newException(runtime, excptnClass, msg).toThrowable(); }
public static RaiseException from(Ruby runtime, RubyClass excptnClass, String msg, IRubyObject backtrace) { return RubyException.newException(runtime, excptnClass, msg).toThrowable(); }
public static RaiseException from(Ruby runtime, RubyClass excptnClass, String msg, IRubyObject backtrace) { return RubyException.newException(runtime, excptnClass, msg).toThrowable(); }
public static RaiseException from(Ruby runtime, RubyClass excptnClass, String msg) { return RubyException.newException(runtime, excptnClass, msg).toThrowable(); }
private static RaiseException newMemcachedError(Ruby ruby, String klass, String message) { RubyClass errorClass = ruby.getModule("Memcached").getClass(klass); return new RaiseException(RubyException.newException(ruby, errorClass, message), true); } }
static RaiseException newZlibError(Ruby runtime, String klass, String message) { RubyClass errorClass = runtime.getModule("Zlib").getClass(klass); return new RaiseException(RubyException.newException(runtime, errorClass, message), true); }
static RaiseException newZlibError(Ruby runtime, String klass, String message) { RubyClass errorClass = runtime.getModule("Zlib").getClass(klass); return new RaiseException(RubyException.newException(runtime, errorClass, message), true); }
static RaiseException newGzipFileError(Ruby runtime, String klass, String message) { RubyClass errorClass = runtime.getModule("Zlib").getClass("GzipFile").getClass(klass); RubyException excn = RubyException.newException(runtime, errorClass, message); // TODO: not yet supported. rewrite GzipReader/Writer with Inflate/Deflate? excn.setInstanceVariable("@input", runtime.getNil()); return excn.toThrowable(); }
static RaiseException newGzipFileError(Ruby runtime, String klass, String message) { RubyClass errorClass = runtime.getModule("Zlib").getClass("GzipFile").getClass(klass); RubyException excn = RubyException.newException(runtime, errorClass, message); // TODO: not yet supported. rewrite GzipReader/Writer with Inflate/Deflate? excn.setInstanceVariable("@input", runtime.getNil()); return excn.toThrowable(); }
static RaiseException newGzipFileError(Ruby runtime, String klass, String message) { RubyClass errorClass = runtime.getModule("Zlib").getClass("GzipFile").getClass(klass); RubyException excn = RubyException.newException(runtime, errorClass, message); if (runtime.is1_9()) { // TODO: not yet supported. rewrite GzipReader/Writer with Inflate/Deflate? excn.setInstanceVariable("@input", runtime.getNil()); } return new RaiseException(excn, true); }
static RaiseException newGzipFileError(Ruby runtime, String klass, String message) { RubyClass errorClass = runtime.getModule("Zlib").getClass("GzipFile").getClass(klass); RubyException excn = RubyException.newException(runtime, errorClass, message); if (runtime.is1_9()) { // TODO: not yet supported. rewrite GzipReader/Writer with Inflate/Deflate? excn.setInstanceVariable("@input", runtime.getNil()); } return new RaiseException(excn, true); }
@JRubyMethod(name = "unscan") public IRubyObject unscan() { check(); Ruby runtime = getRuntime(); if (!isMatched()) { RubyClass errorClass = runtime.getClass("StringScanner").getClass("Error"); throw new RaiseException(RubyException.newException( runtime, errorClass, "unscan failed: previous match had failed")); } pos = lastPos; clearMatched(); return this; }
@JRubyMethod(name = "unscan") public IRubyObject unscan() { check(); Ruby runtime = getRuntime(); if (!isMatched()) { RubyClass errorClass = runtime.getClass("StringScanner").getClass("Error"); throw new RaiseException(RubyException.newException( runtime, errorClass, "unscan failed: previous match had failed")); } pos = lastPos; clearMatched(); return this; }
} else { RubyClass exc = (RubyClass)(recv.getRuntime().getModule("Timeout").getConstant("Error")); throw new RaiseException(RubyException.newException(recv.getRuntime(), exc, "execution expired"),false);
} else { RubyClass exc = (RubyClass)(recv.getRuntime().getModule("Timeout").getConstant("Error")); throw new RaiseException(RubyException.newException(recv.getRuntime(), exc, "execution expired"),false);