Check conditions to identify XmlRpc error: cannot marshal None unless allow_none is enabled [closed]

asked 2019-03-25 02:48:53 -0500

Alsing gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alsing
close date 2020-12-03 23:03:05.724085