本文整理了Java中org.jruby.Ruby.incrementExceptionCount
方法的一些代码示例,展示了Ruby.incrementExceptionCount
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.incrementExceptionCount
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:incrementExceptionCount
[英]Increment the count of exceptions generated by code in this runtime.
[中]增加代码在此运行时生成的异常数。
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void preRaise(ThreadContext context, StackTraceElement[] javaTrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
exception.prepareIntegratedBacktrace(context, javaTrace);
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.dumpException(exception);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private void preRaise(ThreadContext context, StackTraceElement[] javaTrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
exception.prepareIntegratedBacktrace(context, javaTrace);
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.dumpException(exception);
}
代码示例来源:origin: org.jruby/jruby-complete
private void preRaise(ThreadContext context, StackTraceElement[] javaTrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.logException(exception);
if (requiresBacktrace(context)) {
exception.prepareIntegratedBacktrace(context, javaTrace);
}
}
代码示例来源:origin: org.jruby/jruby-core
private void preRaise(ThreadContext context, StackTraceElement[] javaTrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.logException(exception);
if (requiresBacktrace(context)) {
exception.prepareIntegratedBacktrace(context, javaTrace);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private void preRaise(ThreadContext context, IRubyObject backtrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
if (backtrace == null) {
exception.prepareBacktrace(context, nativeException);
} else {
exception.forceBacktrace(backtrace);
}
// call Throwable.setStackTrace so that when RaiseException appears nested inside another exception,
// Ruby stack trace gets displayed
// JRUBY-2673: if wrapping a NativeException, use the actual Java exception's trace as our Java trace
if (exception instanceof NativeException) {
setStackTrace(((NativeException)exception).getCause().getStackTrace());
} else {
setStackTrace(javaTraceFromRubyTrace(exception.getBacktraceElements()));
}
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.dumpException(exception);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void preRaise(ThreadContext context, IRubyObject backtrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
if (backtrace == null) {
exception.prepareBacktrace(context, nativeException);
} else {
exception.forceBacktrace(backtrace);
}
// call Throwable.setStackTrace so that when RaiseException appears nested inside another exception,
// Ruby stack trace gets displayed
// JRUBY-2673: if wrapping a NativeException, use the actual Java exception's trace as our Java trace
if (exception instanceof NativeException) {
setStackTrace(((NativeException)exception).getCause().getStackTrace());
} else {
setStackTrace(javaTraceFromRubyTrace(exception.getBacktraceElements()));
}
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.dumpException(exception);
}
代码示例来源:origin: org.jruby/jruby-complete
private void preRaise(ThreadContext context, IRubyObject backtrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.logException(exception);
// We can only omit backtraces of descendents of Standard error for 'foo rescue nil'
if (requiresBacktrace(context)) {
if (backtrace == null) {
exception.prepareBacktrace(context);
} else {
exception.forceBacktrace(backtrace);
if ( backtrace.isNil() ) return;
}
setStackTrace(RaiseException.javaTraceFromRubyTrace(exception.getBacktraceElements()));
}
}
代码示例来源:origin: org.jruby/jruby-core
private void preRaise(ThreadContext context, IRubyObject backtrace) {
context.runtime.incrementExceptionCount();
doSetLastError(context);
doCallEventHook(context);
if (RubyInstanceConfig.LOG_EXCEPTIONS) TraceType.logException(exception);
// We can only omit backtraces of descendents of Standard error for 'foo rescue nil'
if (requiresBacktrace(context)) {
if (backtrace == null) {
exception.prepareBacktrace(context);
} else {
exception.forceBacktrace(backtrace);
if ( backtrace.isNil() ) return;
}
setStackTrace(RaiseException.javaTraceFromRubyTrace(exception.getBacktraceElements()));
}
}
内容来源于网络,如有侵权,请联系作者删除!