Skip to content
Snippets Groups Projects
Commit ebccb3ae authored by Patrick MADELA's avatar Patrick MADELA
Browse files

Update conan version to 1.13.14

parents d7889d32 29b5ad26
No related branches found
No related tags found
No related merge requests found
YAT4Tango history file YAT4Tango history file
1.13.14 (2023/12/05)
====================
Additions
New free functions to ease error management using exceptions:
- throw_yat_exception
- throw_devfailed_exception
-> see <yat4tango/ExceptionHelper.h>
1.13.13 (2023/07/19)
====================
Fixes
Logging (FileAppender & InnerAppender)
Use the correct timestamp from the tango log event object
1.13.12 (2023/04/12) 1.13.12 (2023/04/12)
==================== ====================
......
...@@ -3,7 +3,7 @@ from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps ...@@ -3,7 +3,7 @@ from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
class yat4tangoRecipe(ConanFile): class yat4tangoRecipe(ConanFile):
name = "yat4tango" name = "yat4tango"
version = "1.13.13" version = "1.13.14"
package_type = "library" package_type = "library"
user = "soleil" user = "soleil"
......
...@@ -348,6 +348,25 @@ namespace yat4tango ...@@ -348,6 +348,25 @@ namespace yat4tango
# pragma warning( pop ) # pragma warning( pop )
#endif #endif
// =============================================================================
// Free functions
// =============================================================================
// =============================================================================
//! \brief convert any kind of exception to yat::Exception and rethrow
void throw_yat_exception();
//! \brief convert any kind of exception to yat exception, add an error and rethrow
void throw_yat_exception(const std::string& reason, const std::string& desc,
const std::string& origin);
//! \brief convert any kind of exception to Tango::DevFailed and rethrow
void throw_devfailed_exception();
//! \brief convert any kind of exception to Tango::DevFailed, add an error and rethrow
void throw_devfailed_exception(const std::string& reason, const std::string& desc,
const std::string& origin);
} // namespace } // namespace
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<artifactId>YAT4Tango-${aol}-${library}-${mode}</artifactId> <artifactId>YAT4Tango-${aol}-${library}-${mode}</artifactId>
<version>1.13.12</version> <version>1.13.14</version>
<packaging>nar</packaging> <packaging>nar</packaging>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>fr.soleil.lib</groupId> <groupId>fr.soleil.lib</groupId>
<artifactId>YAT4Tango-amd64-Linux-gcc-shared-${mode}</artifactId> <artifactId>YAT4Tango-amd64-Linux-gcc-shared-${mode}</artifactId>
<version>1.13.12</version> <version>1.13.13</version>
<packaging>nar</packaging> <packaging>nar</packaging>
<name>YAT4Tango</name> <name>YAT4Tango</name>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>fr.soleil.lib</groupId> <groupId>fr.soleil.lib</groupId>
<artifactId>YAT4Tango-${aol}-shared-${mode}</artifactId> <artifactId>YAT4Tango-${aol}-shared-${mode}</artifactId>
<version>1.13.11</version> <version>1.13.13</version>
<packaging>nar</packaging> <packaging>nar</packaging>
<name>YAT4Tango</name> <name>YAT4Tango</name>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</scm> </scm>
<properties> <properties>
<YAT.version>1.18.8</YAT.version> <YAT.version>1.20.2</YAT.version>
<libs-64bits>//filer2.ica.synchrotron-soleil.fr/ica/LIB_VC12_64</libs-64bits> <libs-64bits>//filer2.ica.synchrotron-soleil.fr/ica/LIB_VC12_64</libs-64bits>
......
...@@ -82,4 +82,84 @@ namespace yat4tango ...@@ -82,4 +82,84 @@ namespace yat4tango
yat_sev); yat_sev);
} }
} }
//------------------------------------------------------------------------
void throw_yat_exception()
{
try
{
throw;
}
catch (const yat::Exception&)
{
throw;
}
catch (const Tango::DevFailed& df)
{
THROW_TANGO_TO_YAT_EXCEPTION(df);
}
catch (const std::exception& std_err)
{
throw yat::Exception("STD_ERROR", std_err.what(), "??");
}
catch (...)
{
throw yat::Exception("UNKNOWN_ERROR", "unknown error caught", "??");
}
}
//------------------------------------------------------------------------
void throw_yat_exception(const std::string& reason, const std::string& desc,
const std::string& origin)
{
try
{
throw_yat_exception();
}
catch (yat::Exception& err)
{
err.push_error(reason, desc, origin);
throw err;
}
}
//------------------------------------------------------------------------
void throw_devfailed_exception()
{
try
{
throw;
}
catch (const Tango::DevFailed&)
{
throw;
}
catch (const yat::Exception& yat_err)
{
THROW_YAT_TO_TANGO_EXCEPTION(yat_err);
}
catch (const std::exception& std_err)
{
Tango::Except::throw_exception("STD_ERROR", std_err.what(), "??");
}
catch (...)
{
Tango::Except::throw_exception("UNKNOWN_ERROR", "unknown error caught", "??");
}
}
//------------------------------------------------------------------------
void throw_devfailed_exception(const std::string& reason, const std::string& desc,
const std::string& origin)
{
try
{
throw_devfailed_exception();
}
catch (Tango::DevFailed& err)
{
Tango::Except::re_throw_exception(err, reason, desc, origin);
}
}
} }
...@@ -660,8 +660,6 @@ int InnerAppender::_append (const log4tango::LoggingEvent& event) ...@@ -660,8 +660,6 @@ int InnerAppender::_append (const log4tango::LoggingEvent& event)
//- reformat the incomming LoggingEvent //- reformat the incomming LoggingEvent
LogPtr ptr_log = new Log; LogPtr ptr_log = new Log;
/* Should use the original event timestamp but due to millisec precision
we have to use our own timestamp */
yat::Time tm_log; yat::Time tm_log;
tm_log.set_double_unix(event.timestamp.get_seconds()); tm_log.set_double_unix(event.timestamp.get_seconds());
tm_log.add_sec(double(event.timestamp.get_microseconds()) / MICROSEC_PER_SEC); tm_log.add_sec(double(event.timestamp.get_microseconds()) / MICROSEC_PER_SEC);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment