roscpp throws exceptions only in truly unexpected, programmer error conditions. All of roscpp's exceptions inherit from a common ros::Exception base class.
ros::InvalidNodeNameException
Thrown if an invalid base name is passed to ros::init(), usually because it has a / in it
ros::InvalidNameException
0.10-: Thrown if a name beginning with a ~ is passed to any NodeHandle method.
0.11+: Thrown if an invalid name is passed to any roscpp function.