本文整理了Java中org.jruby.Ruby.ifAllowed
方法的一些代码示例,展示了Ruby.ifAllowed
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.ifAllowed
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:ifAllowed
暂无
代码示例来源:origin: org.jruby/jruby-complete
private void initExceptions() {
ifAllowed("StandardError", (ruby) -> standardError = RubyStandardError.define(ruby, exceptionClass));
ifAllowed("RubyError", (ruby) -> runtimeError = RubyRuntimeError.define(ruby, standardError));
ifAllowed("FrozenError", (ruby) -> frozenError = RubyFrozenError.define(ruby, runtimeError));
ifAllowed("IOError", (ruby) -> ioError = RubyIOError.define(ruby, standardError));
ifAllowed("ScriptError", (ruby) -> scriptError = RubyScriptError.define(ruby, exceptionClass));
ifAllowed("RangeError", (ruby) -> rangeError = RubyRangeError.define(ruby, standardError));
ifAllowed("SignalException", (ruby) -> signalException = RubySignalException.define(ruby, exceptionClass));
ifAllowed("NameError", (ruby) -> {
nameError = RubyNameError.define(ruby, standardError);
nameErrorMessage = RubyNameError.RubyNameErrorMessage.define(ruby, nameError);
});
ifAllowed("NoMethodError", (ruby) -> noMethodError = RubyNoMethodError.define(ruby, nameError));
ifAllowed("SystemExit", (ruby) -> systemExit = RubySystemExit.define(ruby, exceptionClass));
ifAllowed("LocalJumpError", (ruby) -> localJumpError = RubyLocalJumpError.define(ruby, standardError));
ifAllowed("SystemCallError", (ruby) -> systemCallError = RubySystemCallError.define(ruby, standardError));
ifAllowed("Fatal", (ruby) -> fatal = RubyFatal.define(ruby, exceptionClass));
ifAllowed("Interrupt", (ruby) -> interrupt = RubyInterrupt.define(ruby, signalException));
ifAllowed("TypeError", (ruby) -> typeError = RubyTypeError.define(ruby, standardError));
ifAllowed("ArgumentError", (ruby) -> argumentError = RubyArgumentError.define(ruby, standardError));
ifAllowed("UncaughtThrowError", (ruby) -> uncaughtThrowError = RubyUncaughtThrowError.define(ruby, argumentError));
ifAllowed("IndexError", (ruby) -> indexError = RubyIndexError.define(ruby, standardError));
ifAllowed("StopIteration", (ruby) -> stopIteration = RubyStopIteration.define(ruby, indexError));
ifAllowed("SyntaxError", (ruby) -> syntaxError = RubySyntaxError.define(ruby, scriptError));
ifAllowed("LoadError", (ruby) -> loadError = RubyLoadError.define(ruby, scriptError));
ifAllowed("NotImplementedError", (ruby) -> notImplementedError = RubyNotImplementedError.define(ruby, scriptError));
ifAllowed("SecurityError", (ruby) -> securityError = RubySecurityError.define(ruby, exceptionClass));
ifAllowed("NoMemoryError", (ruby) -> noMemoryError = RubyNoMemoryError.define(ruby, exceptionClass));
ifAllowed("RegexpError", (ruby) -> regexpError = RubyRegexpError.define(ruby, standardError));
代码示例来源:origin: org.jruby/jruby-core
private void initExceptions() {
ifAllowed("StandardError", (ruby) -> standardError = RubyStandardError.define(ruby, exceptionClass));
ifAllowed("RubyError", (ruby) -> runtimeError = RubyRuntimeError.define(ruby, standardError));
ifAllowed("FrozenError", (ruby) -> frozenError = RubyFrozenError.define(ruby, runtimeError));
ifAllowed("IOError", (ruby) -> ioError = RubyIOError.define(ruby, standardError));
ifAllowed("ScriptError", (ruby) -> scriptError = RubyScriptError.define(ruby, exceptionClass));
ifAllowed("RangeError", (ruby) -> rangeError = RubyRangeError.define(ruby, standardError));
ifAllowed("SignalException", (ruby) -> signalException = RubySignalException.define(ruby, exceptionClass));
ifAllowed("NameError", (ruby) -> {
nameError = RubyNameError.define(ruby, standardError);
nameErrorMessage = RubyNameError.RubyNameErrorMessage.define(ruby, nameError);
});
ifAllowed("NoMethodError", (ruby) -> noMethodError = RubyNoMethodError.define(ruby, nameError));
ifAllowed("SystemExit", (ruby) -> systemExit = RubySystemExit.define(ruby, exceptionClass));
ifAllowed("LocalJumpError", (ruby) -> localJumpError = RubyLocalJumpError.define(ruby, standardError));
ifAllowed("SystemCallError", (ruby) -> systemCallError = RubySystemCallError.define(ruby, standardError));
ifAllowed("Fatal", (ruby) -> fatal = RubyFatal.define(ruby, exceptionClass));
ifAllowed("Interrupt", (ruby) -> interrupt = RubyInterrupt.define(ruby, signalException));
ifAllowed("TypeError", (ruby) -> typeError = RubyTypeError.define(ruby, standardError));
ifAllowed("ArgumentError", (ruby) -> argumentError = RubyArgumentError.define(ruby, standardError));
ifAllowed("UncaughtThrowError", (ruby) -> uncaughtThrowError = RubyUncaughtThrowError.define(ruby, argumentError));
ifAllowed("IndexError", (ruby) -> indexError = RubyIndexError.define(ruby, standardError));
ifAllowed("StopIteration", (ruby) -> stopIteration = RubyStopIteration.define(ruby, indexError));
ifAllowed("SyntaxError", (ruby) -> syntaxError = RubySyntaxError.define(ruby, scriptError));
ifAllowed("LoadError", (ruby) -> loadError = RubyLoadError.define(ruby, scriptError));
ifAllowed("NotImplementedError", (ruby) -> notImplementedError = RubyNotImplementedError.define(ruby, scriptError));
ifAllowed("SecurityError", (ruby) -> securityError = RubySecurityError.define(ruby, exceptionClass));
ifAllowed("NoMemoryError", (ruby) -> noMemoryError = RubyNoMemoryError.define(ruby, exceptionClass));
ifAllowed("RegexpError", (ruby) -> regexpError = RubyRegexpError.define(ruby, standardError));
内容来源于网络,如有侵权,请联系作者删除!