include/ruby/internal/error.h: refactor move contents around [ci skip]

This commit is contained in:
卜部昌平 2020-12-21 11:16:16 +09:00
parent 1b6245ccdc
commit 891dbedd00
Notes: git 2021-09-10 20:01:48 +09:00

View File

@ -32,28 +32,6 @@
* @{ * @{
*/ */
RBIMPL_SYMBOL_EXPORT_BEGIN()
/**
* This is the same as `$!` in Ruby.
*
* @retval RUBY_Qnil Not handling exceptions at the moment.
* @retval otherwise The current exception in the current thread.
* @ingroup exception
*/
VALUE rb_errinfo(void);
/**
* Sets the current exception (`$!`) to the given value.
*
* @exception rb_eTypeError What is given was neither ::rb_eException nor
* ::RUBY_Qnil.
* @note Use rb_raise() instead to raise `err`. This function just
* assigns the given object to the global variable.
* @ingroup exception
*/
void rb_set_errinfo(VALUE);
/** /**
* Warning categories. A warning issued using this API can be selectively * Warning categories. A warning issued using this API can be selectively
* requested / suppressed by the end-users. For instance passing * requested / suppressed by the end-users. For instance passing
@ -82,6 +60,28 @@ enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE #define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
/** @endcond */ /** @endcond */
RBIMPL_SYMBOL_EXPORT_BEGIN()
/**
* This is the same as `$!` in Ruby.
*
* @retval RUBY_Qnil Not handling exceptions at the moment.
* @retval otherwise The current exception in the current thread.
* @ingroup exception
*/
VALUE rb_errinfo(void);
/**
* Sets the current exception (`$!`) to the given value.
*
* @exception rb_eTypeError What is given was neither ::rb_eException nor
* ::RUBY_Qnil.
* @note Use rb_raise() instead to raise `err`. This function just
* assigns the given object to the global variable.
* @ingroup exception
*/
void rb_set_errinfo(VALUE);
RBIMPL_ATTR_NORETURN() RBIMPL_ATTR_NORETURN()
RBIMPL_ATTR_NONNULL((2)) RBIMPL_ATTR_NONNULL((2))
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3) RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)