Check conditions to identify XmlRpc error: cannot marshal None unless allow_none is enabled [closed]
Hi I'm using roscpp on ROS Kinetic to identify correct user input for parameters. The only scenario I'm left struggling with is if the parameter was left as for eg, "range: ".
I tried
XmlRpc::XmlRpcValue value;
nh_.getParam(param_name, received);
if (received.getType() == XmlRpc::XmlRpcValue::TypeInvalid)
ROS_DEBUG_STREAM("None type detected");
But when such an error occurs, it seems to occur way before the fuction loading the parameter is ran. I couldnt get any debug msgs to be printed, not matter how early I look through the flow of the programme.
What is the correct way to identify "None" situations so I can print appropriate corrective messages?