From be0af3d22475b0c3853a334f6b23160eb7a1f886 Mon Sep 17 00:00:00 2001 From: mat007 Date: Fri, 11 Sep 2009 12:26:46 +0000 Subject: [PATCH] Wrapped exceptions with boost::enable_current_exception git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@36 860be788-9bd5-4423-9f1e-828f051e677b --- src/libraries/turtle/error.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libraries/turtle/error.hpp b/src/libraries/turtle/error.hpp index 25a19c4..374b51d 100644 --- a/src/libraries/turtle/error.hpp +++ b/src/libraries/turtle/error.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace mock { @@ -48,7 +49,7 @@ namespace detail ++detail::errors.count_; static std::string m; m = "mock error : missing result specification"; - throw mock::exception( m ); + throw boost::enable_current_exception( mock::exception( m ) ); } static Result no_match( const std::string& context ) @@ -56,7 +57,7 @@ namespace detail ++detail::errors.count_; static std::string m; m = "mock error : unexpected call : " + context; - throw mock::exception( m ); + throw boost::enable_current_exception( mock::exception( m ) ); } static void sequence_failed( const std::string& context, @@ -65,7 +66,7 @@ namespace detail ++detail::errors.count_; static std::string m; m = "mock error : sequence failed : " + context; - throw mock::exception( m ); + throw boost::enable_current_exception( mock::exception( m ) ); } static void verification_failed( const std::string& context,