Skip to content

Commit 0035f33

Browse files
committed
Improve output readibility on automatically shortened recipe
1 parent 8e74347 commit 0035f33

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/rtde/rtde_client.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,11 @@ void RTDEClient::setupOutputs(const uint16_t protocol_version)
331331
if (!unavailable_variables.empty())
332332
{
333333
std::stringstream error_message;
334-
error_message << "The following variables are not recognized by the robot: ";
335-
std::for_each(unavailable_variables.begin(), unavailable_variables.end(),
336-
[&error_message](const std::string& variable_name) { error_message << variable_name << " "; });
337-
error_message << ". Either your output recipe contains errors "
334+
error_message << "The following variables are not recognized by the robot:";
335+
std::for_each(
336+
unavailable_variables.begin(), unavailable_variables.end(),
337+
[&error_message](const std::string& variable_name) { error_message << "\n - '" << variable_name << "'"; });
338+
error_message << "\nEither your output recipe contains errors "
338339
"or the urcontrol version does not support "
339340
"them.";
340341

@@ -345,6 +346,7 @@ void RTDEClient::setupOutputs(const uint16_t protocol_version)
345346

346347
// Some variables are not available so retry setting up the communication with a stripped-down output recipe
347348
resetOutputRecipe(available_variables);
349+
return;
348350
}
349351
else
350352
{

0 commit comments

Comments
 (0)