本文整理了Java中org.jruby.Ruby.printError
方法的一些代码示例,展示了Ruby.printError
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.printError
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:printError
[英]Prints an error with backtrace to the error stream. MRI: eval.c - error_print()
[中]打印错误并回溯到错误流。核磁共振成像:评估。c-错误_print()
代码示例来源:origin: org.jruby/jruby-complete
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
if (exception instanceof RaiseException) runtime.printError(((RaiseException) exception).getException());
}
代码示例来源:origin: org.jruby/jruby-complete
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
assert exception != null;
if (exception instanceof RaiseException) runtime.printError(((RaiseException)exception).getException());
}
代码示例来源:origin: org.jruby/jruby-core
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
assert exception != null;
if (exception instanceof RaiseException) runtime.printError(((RaiseException)exception).getException());
}
代码示例来源:origin: org.jruby/jruby-core
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
if (exception instanceof RaiseException) runtime.printError(((RaiseException) exception).getException());
}
代码示例来源:origin: org.jruby/jruby-core
public void printError(Throwable t) {
if (t instanceof RaiseException) {
printError(((RaiseException) t).getException());
}
PrintStream errorStream = getErrorStream();
try {
t.printStackTrace(errorStream);
} catch (Exception e) {
t.printStackTrace(System.err);
}
}
代码示例来源:origin: org.jruby/jruby-complete
public void printError(Throwable t) {
if (t instanceof RaiseException) {
printError(((RaiseException) t).getException());
}
PrintStream errorStream = getErrorStream();
try {
t.printStackTrace(errorStream);
} catch (Exception e) {
t.printStackTrace(System.err);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
if (exception instanceof RaiseException) {
JumpException je = (JumpException)exception;
if (je instanceof RaiseException) {
runtime.printError(((RaiseException)je).getException());
} else if (je instanceof JumpException.BreakJump) {
runtime.getErrorStream().println("break without block.");
} else if (je instanceof JumpException.ReturnJump) {
runtime.getErrorStream().println("return without block.");
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
if (exception instanceof RaiseException) {
JumpException je = (JumpException)exception;
if (je instanceof RaiseException) {
runtime.printError(((RaiseException)je).getException());
} else if (je instanceof JumpException.BreakJump) {
runtime.getErrorStream().println("break without block.");
} else if (je instanceof JumpException.ReturnJump) {
runtime.getErrorStream().println("return without block.");
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
assert exception != null;
if (exception instanceof RaiseException) {
JumpException je = (JumpException)exception;
if (je instanceof RaiseException) {
runtime.printError(((RaiseException)je).getException());
} else if (je instanceof JumpException.BreakJump) {
runtime.getErrorStream().println("break without block.");
} else if (je instanceof JumpException.ReturnJump) {
runtime.getErrorStream().println("return without block.");
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
*
* Prints out an error message.
*
* @param exception An Exception thrown by JRuby
*/
private static void printException(Ruby runtime, Exception exception) {
assert exception != null;
if (exception instanceof RaiseException) {
JumpException je = (JumpException)exception;
if (je instanceof RaiseException) {
runtime.printError(((RaiseException)je).getException());
} else if (je instanceof JumpException.BreakJump) {
runtime.getErrorStream().println("break without block.");
} else if (je instanceof JumpException.ReturnJump) {
runtime.getErrorStream().println("return without block.");
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public void exceptionRaised(RaiseException exception) {
assert isCurrent();
RubyException rubyException = exception.getException();
Ruby runtime = rubyException.getRuntime();
if (runtime.getSystemExit().isInstance(rubyException)) {
runtime.getThreadService().getMainThread().raise(new IRubyObject[] {rubyException}, Block.NULL_BLOCK);
} else if (abortOnException(runtime)) {
RubyException systemExit;
if (!runtime.is1_9()) {
runtime.printError(rubyException);
String message = rubyException.message.convertToString().toString();
systemExit = RubySystemExit.newInstance(runtime, 1, message);
systemExit.set_backtrace(rubyException.backtrace());
} else {
systemExit = rubyException;
}
runtime.getThreadService().getMainThread().raise(new IRubyObject[] {systemExit}, Block.NULL_BLOCK);
return;
} else if (runtime.getDebug().isTrue()) {
runtime.printError(exception.getException());
}
exitingException = exception;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public void exceptionRaised(RaiseException exception) {
assert isCurrent();
RubyException rubyException = exception.getException();
Ruby runtime = rubyException.getRuntime();
if (runtime.getSystemExit().isInstance(rubyException)) {
runtime.getThreadService().getMainThread().raise(new IRubyObject[] {rubyException}, Block.NULL_BLOCK);
} else if (abortOnException(runtime)) {
RubyException systemExit;
if (!runtime.is1_9()) {
runtime.printError(rubyException);
String message = rubyException.message.convertToString().toString();
systemExit = RubySystemExit.newInstance(runtime, 1, message);
systemExit.set_backtrace(rubyException.backtrace());
} else {
systemExit = rubyException;
}
runtime.getThreadService().getMainThread().raise(new IRubyObject[] {systemExit}, Block.NULL_BLOCK);
return;
} else if (runtime.getDebug().isTrue()) {
runtime.printError(exception.getException());
}
exitingException = exception;
}
代码示例来源:origin: org.jruby/jruby-complete
if (reportOnException.isTrue()) {
printReportExceptionWarning();
runtime.printError(throwable);
runtime.printError(throwable);
代码示例来源:origin: org.jruby/jruby-core
if (reportOnException.isTrue()) {
printReportExceptionWarning();
runtime.printError(throwable);
runtime.printError(throwable);
代码示例来源:origin: org.jruby/jruby-complete
runtime.printError(e.getException());
throw new InvokeFailedException(e.getMessage(), e);
} catch (Throwable e) {
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
runtime.printError(e.getException());
throw new InvokeFailedException(e.getMessage(), e);
} catch (Throwable e) {
代码示例来源:origin: org.jruby/jruby-core
runtime.printError(e.getException());
throw new InvokeFailedException(e.getMessage(), e);
} catch (Throwable e) {
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
runtime.printError(e.getException());
throw new InvokeFailedException(e.getMessage(), e);
} catch (Throwable e) {
代码示例来源:origin: org.jruby/jruby-complete
runtime.printError(e.getException());
throw new ParseFailedException(e.getMessage(), e);
} catch (Throwable e) {
代码示例来源:origin: org.jruby/jruby-complete
return ((RubySystemExit) e.getException()).status();
runtime.printError(e.getException());
throw new EvalFailedException(e.getMessage(), e);
内容来源于网络,如有侵权,请联系作者删除!