本文整理了Java中org.jruby.Ruby.newSystemStackError
方法的一些代码示例,展示了Ruby.newSystemStackError
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.newSystemStackError
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:newSystemStackError
暂无
代码示例来源:origin: org.jruby/jruby-complete
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = container.getProvider().getRuntime().getCurrentContext();
try {
if (paramNames != null && args != null) {
for (int i = 0; i < paramNames.size(); i++) {
Object o = paramNames.get(i);
if (o instanceof String) {
String name = (String) o;
container.put(name, args.get(i));
}
}
}
return run(file, line, funcBody);
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private IRubyObject evalBlockBody(ThreadContext context, Binding binding, IRubyObject self) {
// This while loop is for restarting the block call in case a 'redo' fires.
while (true) {
try {
return ASTInterpreter.INTERPRET_BLOCK(context.runtime, context, file, line, body, binding.getMethod(), self, Block.NULL_BLOCK);
} catch (JumpException.RedoJump rj) {
context.pollThreadEvents();
// do nothing, allow loop to redo
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private IRubyObject evalBlockBody(ThreadContext context, Binding binding, IRubyObject self) {
// This while loop is for restarting the block call in case a 'redo' fires.
while (true) {
try {
return ASTInterpreter.INTERPRET_BLOCK(context.runtime, context, file, line, bodyNode, binding.getMethod(), self, Block.NULL_BLOCK);
} catch (JumpException.RedoJump rj) {
context.pollThreadEvents();
// do nothing, allow loop to redo
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private IRubyObject evalBlockBody(ThreadContext context, Binding binding, IRubyObject self) {
// This while loop is for restarting the block call in case a 'redo' fires.
while (true) {
try {
return ASTInterpreter.INTERPRET_BLOCK(context.runtime, context, file, line, bodyNode, binding.getMethod(), self, Block.NULL_BLOCK);
} catch (JumpException.RedoJump rj) {
context.pollThreadEvents();
// do nothing, allow loop to redo
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private IRubyObject evalBlockBody(ThreadContext context, Binding binding, IRubyObject self) {
// This while loop is for restarting the block call in case a 'redo' fires.
while (true) {
try {
return ASTInterpreter.INTERPRET_BLOCK(context.runtime, context, file, line, body, binding.getMethod(), self, Block.NULL_BLOCK);
} catch (JumpException.RedoJump rj) {
context.pollThreadEvents();
// do nothing, allow loop to redo
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = container.getProvider().getRuntime().getCurrentContext();
try {
if (paramNames != null && args != null) {
for (int i = 0; i < paramNames.size(); i++) {
Object o = paramNames.get(i);
if (o instanceof String) {
String name = (String) o;
container.put(name, args.get(i));
}
}
}
return run(file, line, funcBody);
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = container.getProvider().getRuntime().getCurrentContext();
try {
if (paramNames != null && args != null) {
for (int i = 0; i < paramNames.size(); i++) {
Object o = paramNames.get(i);
if (o instanceof String) {
String name = (String) o;
container.put(name, args.get(i));
}
}
}
return run(file, line, funcBody);
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = container.getProvider().getRuntime().getCurrentContext();
try {
if (paramNames != null && args != null) {
for (int i = 0; i < paramNames.size(); i++) {
Object o = paramNames.get(i);
if (o instanceof String) {
String name = (String) o;
container.put(name, args.get(i));
}
}
}
return run(file, line, funcBody);
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = runtime.getCurrentContext();
try {
// Construct local variables based on parameter names passed in
String[] names = new String[paramNames.size()];
paramNames.toArray(names);
context.preBsfApply(names);
// Populate values for the parameter names
DynamicScope scope = context.getCurrentScope();
for (int i = 0, size = args.size(); i < size; i++) {
scope.setValue(i, JavaEmbedUtils.javaToRuby(runtime, args.get(i)), 0);
}
return JavaEmbedUtils.rubyToJava(evaler.parse(runtime, funcBody.toString(), file, line).run());
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
} finally {
context.postBsfApply();
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = runtime.getCurrentContext();
try {
// Construct local variables based on parameter names passed in
String[] names = new String[paramNames.size()];
paramNames.toArray(names);
context.preBsfApply(names);
// Populate values for the parameter names
DynamicScope scope = context.getCurrentScope();
for (int i = 0, size = args.size(); i < size; i++) {
scope.setValue(i, JavaEmbedUtils.javaToRuby(runtime, args.get(i)), 0);
}
return JavaEmbedUtils.rubyToJava(evaler.parse(runtime, funcBody.toString(), file, line).run());
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
} finally {
context.postBsfApply();
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = runtime.getCurrentContext();
try {
// Construct local variables based on parameter names passed in
String[] names = new String[paramNames.size()];
paramNames.toArray(names);
context.preBsfApply(names);
// Populate values for the parameter names
DynamicScope scope = context.getCurrentScope();
for (int i = 0, size = args.size(); i < size; i++) {
scope.setValue(i, JavaEmbedUtils.javaToRuby(runtime, args.get(i)), 0);
}
return JavaEmbedUtils.rubyToJava(evaler.parse(runtime, funcBody.toString(), file, line).run());
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
} finally {
context.postBsfApply();
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public Object apply(String file, int line, int col, Object funcBody, Vector paramNames, Vector args) {
ThreadContext context = runtime.getCurrentContext();
try {
// Construct local variables based on parameter names passed in
String[] names = new String[paramNames.size()];
paramNames.toArray(names);
context.preBsfApply(names);
// Populate values for the parameter names
DynamicScope scope = context.getCurrentScope();
for (int i = 0, size = args.size(); i < size; i++) {
scope.setValue(i, JavaEmbedUtils.javaToRuby(runtime, args.get(i)), 0);
}
return JavaEmbedUtils.rubyToJava(evaler.parse(runtime, funcBody.toString(), file, line).run());
} catch (StackOverflowError soe) {
throw context.runtime.newSystemStackError("stack level too deep", soe);
} finally {
context.postBsfApply();
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
throw runtime.newLocalJumpError(RubyLocalJumpError.Reason.BREAK, (IRubyObject)bj.getValue(), "unexpected break");
} catch (StackOverflowError soe) {
throw runtime.newSystemStackError("stack level too deep", soe);
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
throw runtime.newLocalJumpError(RubyLocalJumpError.Reason.BREAK, (IRubyObject)bj.getValue(), "unexpected break");
} catch (StackOverflowError soe) {
throw runtime.newSystemStackError("stack level too deep", soe);
代码示例来源:origin: org.jruby/jruby-complete
throw runtime.newSystemStackError("stack level too deep", soe);
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
throw new EvalFailedException(e.getMessage(), e);
} catch (StackOverflowError soe) {
throw runtime.newSystemStackError("stack level too deep", soe);
} catch (Throwable e) {
throw new EvalFailedException(e);
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
throw new EvalFailedException(e.getMessage(), e);
} catch (StackOverflowError soe) {
throw runtime.newSystemStackError("stack level too deep", soe);
} catch (Throwable e) {
throw new EvalFailedException(e);
代码示例来源:origin: org.jruby/jruby-core
throw runtime.newSystemStackError("stack level too deep", soe);
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
throw runtime.newLocalJumpError(RubyLocalJumpError.Reason.REDO, (IRubyObject)rj.getValue(), "unexpected redo");
} catch (StackOverflowError soe) {
throw runtime.newSystemStackError("stack level too deep", soe);
} finally {
context.postEvalWithBinding(binding, lastFrame);
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
throw runtime.newLocalJumpError(RubyLocalJumpError.Reason.REDO, (IRubyObject)rj.getValue(), "unexpected redo");
} catch (StackOverflowError soe) {
throw runtime.newSystemStackError("stack level too deep", soe);
} finally {
context.postEvalWithBinding(binding, lastFrame);
内容来源于网络,如有侵权,请联系作者删除!