Skip to content
Snippets Groups Projects
Commit d9ede614 authored by Fabian Tërnava's avatar Fabian Tërnava Committed by ARMAR-7a User
Browse files

Fix return aborted result if main of skill got aborted (instead of failed result)

parent 4905bbc0
No related branches found
No related tags found
No related merge requests found
...@@ -275,12 +275,18 @@ namespace armarx ...@@ -275,12 +275,18 @@ namespace armarx
try try
{ {
mainRet = skill->mainOfSkill(); mainRet = skill->mainOfSkill();
if (mainRet.status != TerminatedSkillStatus::Succeeded) if (mainRet.status == TerminatedSkillStatus::Failed)
{ {
std::string message = "SkillError 501: The main method of skill '" + skillName + std::string message =
"' did not succeed."; "SkillError 501: The main method of skill '" + skillName + "' did fail.";
return exitAndMakeFailedResult(message); return exitAndMakeFailedResult(message);
} }
else if (mainRet.status == TerminatedSkillStatus::Aborted)
{
std::string message =
"SkillError 501: The main method of skill '" + skillName + "' got aborted.";
return exitAndMakeAbortedResult(message);
}
} }
catch (const error::SkillAbortedException& ex) catch (const error::SkillAbortedException& ex)
{ {
......
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