69 #ifndef XSENS_NO_EXCEPTIONS
77 class XsException :
public std::exception
81 XsException(XsException
const& e)
84 , m_description(e.m_description)
98 , m_description(description)
105 explicit XsException(
XsString const& description)
108 , m_description(description)
113 virtual ~XsException() noexcept
118 XsException& operator = (XsException
const& e)
123 m_description = e.m_description;
135 inline char const* what() const noexcept
137 return m_description.c_str();
141 inline XsString const& text() const noexcept
143 return m_description;
152 inline static std::ostream&
operator<< (std::ostream& os,
const XsException& ex)
157 os <<
"XRV " << ex.code();
158 if (ex.code() !=
XRV_OK && !ex.text().empty())
159 os <<
": " << ex.text();