зеркало из https://github.com/github/ruby.git
* README.EXT, README.EXT.ja (rb_protect): add a note when ignoring the caught exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
15e1ff7f23
Коммит
3772335ae6
|
@ -1262,6 +1262,8 @@ Calls the function func with arg as the argument. If no exception
|
|||
occured during func, it returns the result of func and *state is zero.
|
||||
Otherwise, it returns Qnil and sets *state to nonzero. If state is
|
||||
NULL, it is not set in both cases.
|
||||
You have to clear the error info with rb_set_errinfo(Qnil) when
|
||||
ignoring the caught exception.
|
||||
|
||||
void rb_jump_tag(int state)
|
||||
|
||||
|
|
|
@ -1336,6 +1336,8 @@ VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state)
|
|||
関数funcをargを引数として実行し, 例外が発生しなければその戻
|
||||
り値を返す.例外が発生した場合は, *stateに非0をセットして
|
||||
Qnilを返す.
|
||||
rb_jump_tag()を呼ばずに捕捉した例外を無視する場合には,
|
||||
rb_set_errinfo(Qnil)でエラー情報をクリアしなければならない.
|
||||
|
||||
void rb_jump_tag(int state)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче