Go to the documentation of this file.
29 #ifndef UR_CLIENT_LIBRARY_EXCEPTIONS_H_INCLUDED
30 #define UR_CLIENT_LIBRARY_EXCEPTIONS_H_INCLUDED
39 # define WIN32_LEAN_AND_MEAN
40 # include <WinSock2.h>
45 # include <sys/time.h>
59 explicit UrException(
const std::string& what_arg) : std::runtime_error(what_arg)
62 explicit UrException(
const char* what_arg) : std::runtime_error(what_arg)
81 explicit VersionMismatch(
const std::string& text,
const uint32_t version_req,
const uint32_t version_actual)
82 : std::runtime_error(text)
92 virtual const char*
what() const noexcept
override
112 explicit ToolCommNotAvailable(
const std::string& text,
const uint32_t version_req,
const uint32_t version_actual)
113 : std::runtime_error(text),
VersionMismatch(text, version_req, version_actual)
125 explicit TimeoutException(
const std::string& text, std::chrono::milliseconds timeout) : std::runtime_error(text)
127 std::stringstream ss;
128 ss << text <<
"(Configured timeout: " << timeout.count() / 1000.0 <<
" sec)";
132 explicit TimeoutException(
const std::string& text, timeval timeout) : std::runtime_error(text)
134 std::stringstream ss;
135 ss << text <<
"(Configured timeout: " << timeout.tv_sec + timeout.tv_usec * 1e-6 <<
" sec)";
138 virtual const char*
what() const noexcept
override
140 return text_.c_str();
153 : std::runtime_error(text)
155 std::stringstream ss;
157 <<
"The requested feature is incompatible with the connected robot. Minimum required Polyscope version: "
158 << minimum_robot_version <<
", actual Polyscope version: " << actual_robot_version;
161 virtual const char*
what() const noexcept
override
163 return text_.c_str();
181 virtual const char*
what() const noexcept
override
183 return text_.c_str();
194 explicit MissingArgument(std::string text, std::string function_name, std::string argument_name,
float default_value)
195 : std::runtime_error(
"")
197 std::stringstream ss;
198 ss << text <<
"\nMissing argument when calling function: " << function_name
199 <<
". \nArgument missing: " << argument_name
200 <<
". \nSet to default value if not important, default value is: " << default_value;
203 virtual const char*
what() const noexcept
override
205 return text_.c_str();
217 #endif // ifndef UR_CLIENT_LIBRARY_EXCEPTIONS_H_INCLUDED
uint32_t version_required_
UrException(const std::string &what_arg)
IncompatibleRobotVersion()=delete
TimeoutException(const std::string &text, timeval timeout)
IncompatibleRobotVersion(const std::string &text, const VersionInformation &minimum_robot_version, const VersionInformation &actual_robot_version)
Our base class for exceptions. Specialized exceptions should inherit from those.
InvalidRange(std::string text)
virtual const char * what() const noexcept override
virtual ~UrException()=default
UrException(const char *what_arg)
A specialized exception representing that communication to the tool is not possible.
virtual const char * what() const noexcept override
virtual ~VersionMismatch()=default
TimeoutException(const std::string &text, std::chrono::milliseconds timeout)
MissingArgument(std::string text, std::string function_name, std::string argument_name, float default_value)
virtual const char * what() const noexcept override
TimeoutException()=delete
virtual const char * what() const noexcept override
VersionMismatch(const std::string &text, const uint32_t version_req, const uint32_t version_actual)
virtual const char * what() const noexcept override
A specialized exception representing detection of a not supported UR control version.
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58