5 namespace skills::detail
8 skill(
std::move(skill))
17 const std::string skillName =
skill->description.skillName;
21 auto resetExecParam = [&](){
29 auto setExecParams = [&](){
46 if (callbackInterface)
52 auto createErrorMessage = [](
const std::string&
message){
55 obj->addElement(
"errormessage", m);
60 if (
skill->description.acceptedType && not(aron_params))
62 std::string
message =
"SkillError 001: The Skill '" + skillName +
"' requires a type but params are NULL.";
68 if (
skill->description.acceptedType && aron_params && not(aron_params->fullfillsType(
skill->description.acceptedType)))
70 std::string
message =
"SkillError 002: The Skill '" + skillName +
"' has a type and got parameters but the input does not match the type.";
79 if (not
skill->isSkillAvailable(
Skill::InitInput{.executorName = executorName, .params = aron_params}))
81 std::string
message =
"SkillError 101: The Skill '" + skillName +
"' is not available.";
87 catch (
const std::exception& ex)
89 std::string
message =
"SkillError 101e: An error occured during the check whether skill '" + skillName +
"' is available. The error was: " +
GetHandledExceptionString();
103 catch (
const std::exception& ex)
115 skill->waitForDependenciesOfSkill();
117 catch (
const std::exception& ex)
119 std::string
message =
"SkillError 301e: An error occured during waiting for skill dependencies of skill '" + skillName +
"'. The error was: " +
GetHandledExceptionString();
136 std::string
message =
"SkillError 401: The initialization of skill '" + skillName +
"' did not succeed.";
137 skill->exitSkill({executorName, aron_params});
144 catch (
const std::exception& ex)
146 std::string
message =
"SkillError 401e: An error occured during the initialization of skill '" + skillName +
"'. The error was: " +
GetHandledExceptionString();
148 skill->exitSkill({executorName, aron_params});
167 std::string
message =
"SkillError 501: The main method of skill '" + skillName +
"' did not succeed.";
168 skill->exitSkill({executorName, aron_params});
175 catch (
const std::exception& ex)
177 std::string
message =
"SkillError 501e: An error occured during the main method of skill '" + skillName +
"'. The error was: " +
GetHandledExceptionString();
179 skill->exitSkill({executorName, aron_params});
192 std::string
message =
"SkillError 601: The exit method of skill '" + skillName +
"' did not succeed.";
193 skill->exitSkill({executorName, aron_params});
200 catch (
const std::exception& ex)
202 std::string
message =
"SkillError 601e: An error occured during the exit method of skill '" + skillName +
"'. The error was: " +
GetHandledExceptionString();