Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
function rb_protect (Ruby 2.2.0)
[go: Go Back, main page]

Ruby 2.2.0 リファレンスマニュアル > 関数一覧 > rb_protect

function rb_protect

VALUE rb_protect(VALUE (*proc)(), VALUE data, int *state)

初出: [ruby-dev:4064]

proc(data) を評価中のあらゆる大域脱出(例外を含む)を捕捉します。

val = rb_protect(func, arg, &status);
if (status != 0) {
    puts("大域脱出が起きた");
    rb_jump_tag(status);
}