Currently we will not check the return value of dlopen()
, so when the dlopen failed, a nullptr
will be passed to the rcl library, please see:
const rosidl_message_type_support_t* ts =
GetMessageTypeSupport(package_name, message_sub_folder, message_name);
THROW_ERROR_IF_NOT_EQUAL(
RCL_RET_OK,
rcl_subscription_init(subscription, node, ts, topic.c_str(),
&subscription_ops),
rcl_get_error_string_safe());
We'd better check the |ts| and use dlerror()
to get the error message to be returned.