Skip to content

Commit 06ab01c

Browse files
marip8Levi-Armstrong
authored andcommitted
Demangle profile class name
1 parent 7b9eb02 commit 06ab01c

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

  • tesseract_motion_planners/core/include/tesseract_motion_planners

tesseract_motion_planners/core/include/tesseract_motion_planners/planner_utils.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
3131
#include <Eigen/Geometry>
3232
#include <console_bridge/console.h>
33+
#include <boost/core/demangle.hpp>
3334
TESSERACT_COMMON_IGNORE_WARNINGS_POP
3435

3536
#include <tesseract_command_language/constants.h>
@@ -114,20 +115,15 @@ std::shared_ptr<const ProfileType> getProfile(const std::string& ns,
114115
return std::static_pointer_cast<const ProfileType>(
115116
profile_dictionary.getProfile(ProfileType::getStaticKey(), ns, profile));
116117

117-
CONSOLE_BRIDGE_logDebug("Profile '%s' was not found in namespace '%s' for type '%s'. Using default if available. "
118-
"Available "
119-
"profiles:",
120-
profile.c_str(),
121-
ns.c_str(),
122-
typeid(ProfileType).name());
123-
118+
std::stringstream ss;
119+
ss << "Profile '" << profile << "' was not found in namespace '" << ns << "' for type '"
120+
<< boost::core::demangle(typeid(ProfileType).name()) << "'. Using default if available. Available profiles: [";
124121
if (profile_dictionary.hasProfileEntry(ProfileType::getStaticKey(), ns))
125-
{
126122
for (const auto& pair : profile_dictionary.getProfileEntry(ProfileType::getStaticKey(), ns))
127-
{
128-
CONSOLE_BRIDGE_logDebug("%s", pair.first.c_str());
129-
}
130-
}
123+
ss << pair.first << ", ";
124+
ss << "]";
125+
126+
CONSOLE_BRIDGE_logDebug(ss.str().c_str());
131127

132128
return default_profile;
133129
}

0 commit comments

Comments
 (0)