Skip to content
Snippets Groups Projects
Commit c71b526d authored by Christoph Pohl's avatar Christoph Pohl
Browse files

Add Improved exception message handling

parent 1bf381e9
No related branches found
No related tags found
1 merge request!319Fix/robot state memory memory leak
......@@ -86,7 +86,7 @@ namespace armarx
}
catch (const std::exception& ex)
{
std::string message = "SkillError 101e: An error occured during the check whether skill '" + skillName + "' is available. The error was: " + ex.what();
std::string message = "SkillError 101e: An error occured during the check whether skill '" + skillName + "' is available. The error was: " + GetHandledExceptionString();
ARMARX_ERROR_S << message;
resetExecParam();
return TerminatedSkillStatusUpdate({{skill->getSkillId(), executorName, parameterization, createErrorMessage(message)}, TerminatedSkillStatus::Failed});
......@@ -102,7 +102,7 @@ namespace armarx
}
catch (const std::exception& ex)
{
std::string message = "SkillError 201e: An error occured during the reset of skill '" + skillName + "'. The error was: " + ex.what();
std::string message = "SkillError 201e: An error occured during the reset of skill '" + skillName + "'. The error was: " + GetHandledExceptionString();
ARMARX_ERROR_S << message;
updateStatus(SkillStatus::Failed);
......@@ -116,7 +116,7 @@ namespace armarx
}
catch (const std::exception& ex)
{
std::string message = "SkillError 301e: An error occured during waiting for skill dependencies of skill '" + skillName + "'. The error was: " + ex.what();
std::string message = "SkillError 301e: An error occured during waiting for skill dependencies of skill '" + skillName + "'. The error was: " + GetHandledExceptionString();
ARMARX_ERROR_S << message;
updateStatus(SkillStatus::Failed);
......@@ -143,7 +143,7 @@ namespace armarx
}
catch (const std::exception& ex)
{
std::string message = "SkillError 401e: An error occured during the initialization of skill '" + skillName + "'. The error was: " + ex.what();
std::string message = "SkillError 401e: An error occured during the initialization of skill '" + skillName + "'. The error was: " + GetHandledExceptionString();
ARMARX_ERROR_S << message;
skill->exitSkill({executorName, aron_params}); // try to exit skill. Ignore return value
......@@ -174,7 +174,7 @@ namespace armarx
}
catch (const std::exception& ex)
{
std::string message = "SkillError 501e: An error occured during the main method of skill '" + skillName + "'. The error was: " + ex.what();
std::string message = "SkillError 501e: An error occured during the main method of skill '" + skillName + "'. The error was: " + GetHandledExceptionString();
ARMARX_ERROR_S << message;
skill->exitSkill({executorName, aron_params}); // try to exit skill. Ignore return value
......@@ -199,7 +199,7 @@ namespace armarx
}
catch (const std::exception& ex)
{
std::string message = "SkillError 601e: An error occured during the exit method of skill '" + skillName + "'. The error was: " + ex.what();
std::string message = "SkillError 601e: An error occured during the exit method of skill '" + skillName + "'. The error was: " + GetHandledExceptionString();
ARMARX_ERROR_S << message;
updateStatus(SkillStatus::Failed);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment