Fix rcl package's logging API error specs and handling. (#746)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This commit is contained in:
parent
184e3320e3
commit
316765b2e0
2 changed files with 6 additions and 4 deletions
|
@ -48,7 +48,7 @@ typedef rcutils_logging_output_handler_t rcl_logging_output_handler_t;
|
|||
* \return `RCL_RET_OK` if successful, or
|
||||
* \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or
|
||||
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
|
||||
* \return `RCL_RET_ERR` if a general error occurs
|
||||
* \return `RCL_RET_ERROR` if a general error occurs
|
||||
*/
|
||||
RCL_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
|
@ -74,8 +74,9 @@ rcl_logging_configure(
|
|||
* \param allocator Used to allocate memory used by the logging system
|
||||
* \param output_handler Output handler to be installed
|
||||
* \return `RCL_RET_OK` if successful, or
|
||||
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
|
||||
* \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or
|
||||
* \return `RCL_RET_ERR` if a general error occurs
|
||||
* \return `RCL_RET_ERROR` if a general error occurs
|
||||
*/
|
||||
RCL_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
|
@ -97,7 +98,7 @@ rcl_logging_configure_with_output_handler(
|
|||
* Lock-Free | Yes
|
||||
*
|
||||
* \return `RCL_RET_OK` if successful.
|
||||
* \return `RCL_RET_ERR` if a general error occurs
|
||||
* \return `RCL_RET_ERROR` if a general error occurs
|
||||
*/
|
||||
RCL_PUBLIC
|
||||
RCL_WARN_UNUSED
|
||||
|
|
|
@ -60,7 +60,8 @@ rcl_logging_configure_with_output_handler(
|
|||
rcl_logging_output_handler_t output_handler)
|
||||
{
|
||||
RCL_CHECK_ARGUMENT_FOR_NULL(global_args, RCL_RET_INVALID_ARGUMENT);
|
||||
RCL_CHECK_ARGUMENT_FOR_NULL(allocator, RCL_RET_INVALID_ARGUMENT);
|
||||
RCL_CHECK_ALLOCATOR_WITH_MSG(allocator, "invalid allocator", return RCL_RET_INVALID_ARGUMENT);
|
||||
RCL_CHECK_ARGUMENT_FOR_NULL(output_handler, RCL_RET_INVALID_ARGUMENT);
|
||||
RCUTILS_LOGGING_AUTOINIT
|
||||
g_logging_allocator = *allocator;
|
||||
int default_level = global_args->impl->log_level;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue