Skip to content

Commit 4c5032b

Browse files
committed
refactor Task module: replace runtime error for unknown task type with safe fallback string "unknown"
1 parent b9efa05 commit 4c5032b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/core/task/include/task.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ inline std::string GetStringTaskType(TypeOfTask type_of_task, const std::string
8787

8888
std::string type_str = TypeOfTaskToString(type_of_task);
8989
if (type_str == "unknown") {
90-
throw std::runtime_error("Unknown task type");
90+
return type_str;
9191
}
9292

9393
return type_str + "_" + std::string((*list_settings)["tasks"][type_str]);

0 commit comments

Comments
 (0)