diff --git a/livesupport/modules/core/include/LiveSupport/Core/TimeConversion.h b/livesupport/modules/core/include/LiveSupport/Core/TimeConversion.h index 138a8b2f7..465996afa 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/TimeConversion.h +++ b/livesupport/modules/core/include/LiveSupport/Core/TimeConversion.h @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/TimeConversion.h,v $ ------------------------------------------------------------------------------*/ @@ -71,7 +71,7 @@ using namespace LiveSupport; * A helper object holding static time conversion functions. * * @author $Author: maroy $ - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ class TimeConversion { @@ -91,9 +91,12 @@ class TimeConversion * * @param timeval the struct timeval to convert. * @return a boost::posix_time::ptime, holding the same time. + * @exception std::out_of_range if timeval represents a time that + * can not be handled by ptime */ static Ptr::Ref - timevalToPtime(const struct timeval *timeval) throw (); + timevalToPtime(const struct timeval *timeval) + throw (std::out_of_range); /** * Convert a struct tm to a boost::posix_time::ptime, @@ -101,9 +104,12 @@ class TimeConversion * * @param time the struct tm to convert. * @return a boost::posix_time::ptime, holding the same time. + * @exception std::out_of_range if time represents a time that + * can not be handled by ptime */ static Ptr::Ref - tmToPtime(const struct tm *time) throw (); + tmToPtime(const struct tm *time) + throw (std::out_of_range); /** * Return the current time, with microsecond precision. diff --git a/livesupport/modules/core/src/TimeConversion.cxx b/livesupport/modules/core/src/TimeConversion.cxx index 9730853fe..9c818ab28 100644 --- a/livesupport/modules/core/src/TimeConversion.cxx +++ b/livesupport/modules/core/src/TimeConversion.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/TimeConversion.cxx,v $ ------------------------------------------------------------------------------*/ @@ -57,7 +57,7 @@ using namespace LiveSupport::Core; *----------------------------------------------------------------------------*/ Ptr::Ref TimeConversion :: timevalToPtime(const struct timeval *timeval) - throw () + throw (std::out_of_range) { // don't convert through the boost::posix_time::from_time_t() function // as probably because of timezone settings it ruins the actual value @@ -80,7 +80,7 @@ TimeConversion :: timevalToPtime(const struct timeval *timeval) *----------------------------------------------------------------------------*/ Ptr::Ref TimeConversion :: tmToPtime(const struct tm *time) - throw () + throw (std::out_of_range) { // don't convert through the boost::posix_time::from_time_t() function // as probably because of timezone settings it ruins the actual value