|
ros2_control - humble
|
Loading...
Searching...
No Matches
15#ifndef HARDWARE_INTERFACE__MACROS_HPP_
16#define HARDWARE_INTERFACE__MACROS_HPP_
21#include "rcpputils/pointer_traits.hpp"
24#define __PRETTY_FUNCTION__ __FUNCTION__
27#define THROW_ON_NULLPTR(pointer) \
29 rcpputils::is_pointer<typename std::remove_reference<decltype(pointer)>::type>::value, \
30 #pointer " has to be a pointer"); \
33 throw std::runtime_error(std::string(__PRETTY_FUNCTION__) + " failed. " #pointer " is null."); \
36#define THROW_ON_NOT_NULLPTR(pointer) \
38 rcpputils::is_pointer<typename std::remove_reference<decltype(pointer)>::type>::value, \
39 #pointer " has to be a pointer"); \
42 throw std::runtime_error( \
43 std::string(__PRETTY_FUNCTION__) + " failed. " #pointer " would leak memory"); \