本文整理了Java中org.jruby.Ruby.createSysErr
方法的一些代码示例,展示了Ruby.createSysErr
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.createSysErr
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:createSysErr
[英]Creates a system error.
[中]创建系统错误。
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Create module Errno's Variables. We have this method since Errno does not have it's
* own java class.
*/
private void initErrno() {
if (profile.allowModule("Errno")) {
errnoModule = defineModule("Errno");
try {
// define EAGAIN now, so that future EWOULDBLOCK will alias to it
// see MRI's error.c and its explicit ordering of Errno definitions.
createSysErr(Errno.EAGAIN.intValue(), Errno.EAGAIN.name());
for (Errno e : Errno.values()) {
Constant c = (Constant) e;
if (Character.isUpperCase(c.name().charAt(0))) {
createSysErr(c.intValue(), c.name());
}
}
// map ENOSYS to NotImplementedError
errnos.put(Errno.ENOSYS.intValue(), notImplementedError);
} catch (Exception e) {
// dump the trace and continue
// this is currently only here for Android, which seems to have
// bugs in its enumeration logic
// http://code.google.com/p/android/issues/detail?id=2812
LOG.error(e.getMessage(), e);
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Create module Errno's Variables. We have this method since Errno does not have it's
* own java class.
*/
private void initErrno() {
if (profile.allowModule("Errno")) {
errnoModule = defineModule("Errno");
try {
// define EAGAIN now, so that future EWOULDBLOCK will alias to it
// see MRI's error.c and its explicit ordering of Errno definitions.
createSysErr(Errno.EAGAIN.intValue(), Errno.EAGAIN.name());
for (Errno e : Errno.values()) {
Constant c = (Constant) e;
if (Character.isUpperCase(c.name().charAt(0))) {
createSysErr(c.intValue(), c.name());
}
}
// map ENOSYS to NotImplementedError
errnos.put(Errno.ENOSYS.intValue(), notImplementedError);
} catch (Exception e) {
// dump the trace and continue
// this is currently only here for Android, which seems to have
// bugs in its enumeration logic
// http://code.google.com/p/android/issues/detail?id=2812
LOG.error(e.getMessage(), e);
}
}
}
代码示例来源:origin: org.jruby/jruby-complete
/**
* Create module Errno's Variables. We have this method since Errno does not have its
* own java class.
*/
private void initErrno() {
if (profile.allowModule("Errno")) {
errnoModule = defineModule("Errno");
try {
// define EAGAIN now, so that future EWOULDBLOCK will alias to it
// see MRI's error.c and its explicit ordering of Errno definitions.
createSysErr(Errno.EAGAIN.intValue(), Errno.EAGAIN.name());
for (Errno e : Errno.values()) {
Constant c = (Constant) e;
if (Character.isUpperCase(c.name().charAt(0))) {
createSysErr(c.intValue(), c.name());
}
}
// map ENOSYS to NotImplementedError
errnos.put(Errno.ENOSYS.intValue(), notImplementedError);
} catch (Exception e) {
// dump the trace and continue
// this is currently only here for Android, which seems to have
// bugs in its enumeration logic
// http://code.google.com/p/android/issues/detail?id=2812
LOG.error(e);
}
}
}
代码示例来源:origin: org.jruby/jruby-core
/**
* Create module Errno's Variables. We have this method since Errno does not have its
* own java class.
*/
private void initErrno() {
if (profile.allowModule("Errno")) {
errnoModule = defineModule("Errno");
try {
// define EAGAIN now, so that future EWOULDBLOCK will alias to it
// see MRI's error.c and its explicit ordering of Errno definitions.
createSysErr(Errno.EAGAIN.intValue(), Errno.EAGAIN.name());
for (Errno e : Errno.values()) {
Constant c = (Constant) e;
if (Character.isUpperCase(c.name().charAt(0))) {
createSysErr(c.intValue(), c.name());
}
}
// map ENOSYS to NotImplementedError
errnos.put(Errno.ENOSYS.intValue(), notImplementedError);
} catch (Exception e) {
// dump the trace and continue
// this is currently only here for Android, which seems to have
// bugs in its enumeration logic
// http://code.google.com/p/android/issues/detail?id=2812
LOG.error(e);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!