org.jruby.Ruby.isDebug()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中org.jruby.Ruby.isDebug方法的一些代码示例,展示了Ruby.isDebug的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.isDebug方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:isDebug

Ruby.isDebug介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-complete

private static void debugLoadException(final Ruby runtime, final Throwable ex) {
  if (runtime.isDebug()) ex.printStackTrace(runtime.getErr());
}

代码示例来源:origin: org.jruby/jruby-core

private static void debugLoadException(final Ruby runtime, final Throwable ex) {
  if (runtime.isDebug()) ex.printStackTrace(runtime.getErr());
}

代码示例来源:origin: org.jruby/jruby-complete

static void debug(ThreadContext context, final String msg, Exception ex) {
  if (LOG.isDebugEnabled()) LOG.debug(msg, ex);
  else if (context.runtime.isDebug()) LOG.info(msg, ex);
}

代码示例来源:origin: org.jruby/jruby-core

static void debug(ThreadContext context, final String msg, Exception ex) {
  if (LOG.isDebugEnabled()) LOG.debug(msg, ex);
  else if (context.runtime.isDebug()) LOG.info(msg, ex);
}

代码示例来源:origin: org.jruby/jruby-complete

public RaiseException newSystemStackError(String message, StackOverflowError error) {
  if ( isDebug() ) LOG.debug(error);
  return newRaiseException(getSystemStackError(), message);
}

代码示例来源:origin: org.jruby/jruby-core

public RaiseException newSystemStackError(String message, StackOverflowError error) {
  if ( isDebug() ) LOG.debug(error);
  return newRaiseException(getSystemStackError(), message);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

debugLogFound("jarWithExtension", className);
} catch (ClassNotFoundException cnfe) {
  if (runtime.isDebug()) cnfe.printStackTrace();
  if (runtime.isDebug()) ucve.printStackTrace();
  throw runtime.newLoadError("JRuby ext built for wrong Java version in `" + finName + "': " + ucve, finName.toString());
} catch (IOException ioe) {
  if (runtime.isDebug()) ioe.printStackTrace();
  throw runtime.newLoadError("IOException loading extension `" + finName + "`: " + ioe, finName.toString());
} catch (Exception e) {
  if (runtime.isDebug()) e.printStackTrace();
  throw runtime.newLoadError("Exception loading extension `" + finName + "`: " + e, finName.toString());

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

debugLogFound("jarWithExtension", className);
} catch (ClassNotFoundException cnfe) {
  if (runtime.isDebug()) cnfe.printStackTrace();
  if (runtime.isDebug()) ucve.printStackTrace();
  throw runtime.newLoadError("JRuby ext built for wrong Java version in `" + finName + "': " + ucve, finName.toString());
} catch (IOException ioe) {
  if (runtime.isDebug()) ioe.printStackTrace();
  throw runtime.newLoadError("IOException loading extension `" + finName + "`: " + ioe, finName.toString());
} catch (Exception e) {
  if (runtime.isDebug()) e.printStackTrace();
  throw runtime.newLoadError("Exception loading extension `" + finName + "`: " + e, finName.toString());

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public RaiseException newNameError(String message, String name, Throwable origException, boolean printWhenVerbose) {
  if (origException != null) {
    if (printWhenVerbose && isVerbose()) {
      LOG.error(origException.getMessage(), origException);
    } else if (isDebug()) {
      LOG.debug(origException.getMessage(), origException);
    }
  }
  
  return new RaiseException(new RubyNameError(
      this, getNameError(), message, name), false);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public RaiseException newNameError(String message, String name, Throwable origException, boolean printWhenVerbose) {
  if (origException != null) {
    if (printWhenVerbose && isVerbose()) {
      LOG.error(origException.getMessage(), origException);
    } else if (isDebug()) {
      LOG.debug(origException.getMessage(), origException);
    }
  }
  
  return new RaiseException(new RubyNameError(
      this, getNameError(), message, name), false);
}

代码示例来源:origin: org.jruby/jruby-complete

if (runtime.isDebug()) ucve.printStackTrace();
throw runtime.newLoadError("JRuby ext built for wrong Java version in `" + className + "': " + ucve, className);

代码示例来源:origin: org.jruby/jruby-core

if (runtime.isDebug()) ucve.printStackTrace();
throw runtime.newLoadError("JRuby ext built for wrong Java version in `" + className + "': " + ucve, className);

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Construct a NameError with the given pre-formatted message, name, and optional original exception.
 *
 * If the original exception is given, and either we are in verbose mode with printWhenVerbose set to true
 * or we are in debug mode.
 *
 * @param message the pre-formatted message for the NameError
 * @param name the name that failed
 * @param exception the original exception, or null
 * @param printWhenVerbose whether to log this exception when verbose mode is enabled
 * @return a new NameError
 */
public RaiseException newNameError(String message, String name, Throwable exception, boolean printWhenVerbose) {
  if (exception != null) {
    if (printWhenVerbose && isVerbose()) {
      LOG.error(exception);
    } else if (isDebug()) {
      LOG.debug(exception);
    }
  }
  return new RubyNameError(this, getNameError(), message, name).toThrowable();
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Construct a NameError with the given pre-formatted message, name, and optional original exception.
 *
 * If the original exception is given, and either we are in verbose mode with printWhenVerbose set to true
 * or we are in debug mode.
 *
 * @param message the pre-formatted message for the NameError
 * @param name the name that failed
 * @param exception the original exception, or null
 * @param printWhenVerbose whether to log this exception when verbose mode is enabled
 * @return a new NameError
 */
public RaiseException newNameError(String message, String name, Throwable exception, boolean printWhenVerbose) {
  if (exception != null) {
    if (printWhenVerbose && isVerbose()) {
      LOG.error(exception);
    } else if (isDebug()) {
      LOG.debug(exception);
    }
  }
  return new RubyNameError(this, getNameError(), message, name).toThrowable();
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

getJRubyClassLoader().tearDown(isDebug());

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

getJRubyClassLoader().tearDown(isDebug());

代码示例来源:origin: org.jruby/jruby-complete

runtime.getThreadService().getMainThread().raise(rubyException);
} else if (runtime.isDebug()) {
  runtime.printError(throwable);

代码示例来源:origin: org.jruby/jruby-core

runtime.getThreadService().getMainThread().raise(rubyException);
} else if (runtime.isDebug()) {
  runtime.printError(throwable);

代码示例来源:origin: org.jruby/jruby-core

if (runtime.isDebug()) {
  printExceptionSummary(runtime, raise.getException());

代码示例来源:origin: org.jruby/jruby-complete

if (runtime.isDebug()) {
  printExceptionSummary(runtime, raise.getException());

相关文章

微信公众号

最新文章

更多

Ruby类方法