Skip to content
Snippets Groups Projects
Commit bf7d7f4f authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

added tg_strerror for dev errorlist

parent fc18109e
No related branches found
No related tags found
No related merge requests found
...@@ -108,6 +108,21 @@ string CaTDBCacheU::format_to_str(Tango::AttrDataFormat f) const { ...@@ -108,6 +108,21 @@ string CaTDBCacheU::format_to_str(Tango::AttrDataFormat f) const {
} }
} }
std::string CaTDBCacheU::tg_strerror(const Tango::DevErrorList &errors)
{
std::string msg;
for(int i = errors.length() - 1; i >= 0; i--)
{
msg += errors[i].origin;
msg += "\n";
msg += errors[i].desc;
msg += "\n";
msg += errors[i].reason;
msg += "\n\n";
}
return msg;
}
std::string CaTDBCacheU::tg_strerror(const Tango::DevFailed &e) const std::string CaTDBCacheU::tg_strerror(const Tango::DevFailed &e) const
{ {
std::string msg; std::string msg;
......
...@@ -18,6 +18,7 @@ public: ...@@ -18,6 +18,7 @@ public:
// copied from CuTangoWorld (to avoid including cumbia-tango as dependency) // copied from CuTangoWorld (to avoid including cumbia-tango as dependency)
void m_fill_from_attconf(const Tango::AttributeInfoEx *ai, CuData &dat); void m_fill_from_attconf(const Tango::AttributeInfoEx *ai, CuData &dat);
std::string tg_strerror(const Tango::DevFailed &e) const; std::string tg_strerror(const Tango::DevFailed &e) const;
std::string tg_strerror(const Tango::DevErrorList &errors);
string format_to_str(Tango::AttrDataFormat f) const; string format_to_str(Tango::AttrDataFormat f) const;
// -----------------------------------------------------------------------------+ // -----------------------------------------------------------------------------+
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment