Skip to content
Snippets Groups Projects
Commit a71aebac authored by DESGRANGES's avatar DESGRANGES
Browse files

Explicit error message for certain hardware error

parent 8eeac541
Branches
Tags
1 merge request!3[PIController] Add PIAxis commands and attributes
......@@ -45,8 +45,17 @@ void Serializer::error_handler()
yat::String err = PIBox_ns::SocketManager::get_instance()->write_read("ERR?\n");
if (err[0] != '0')
{
yat::String desc = "Hardware error code: " + yat::StringUtil::to_string(err);
if (err[0] == '7')
{
desc += ": Position out of limits";
}
else if (err[0] == '8')
{
desc += ": Velocity out of limits";
}
Tango::Except::throw_exception("HARDWARE_ERROR",
"Hardware error code: " + yat::StringUtil::to_string(err),
desc,
"Serializer::error_handler()");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment