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,