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
This commit is contained in:
mat007 2009-09-11 12:26:46 +00:00
parent 259c070288
commit be0af3d224

View file

@ -14,6 +14,7 @@
#include <boost/test/test_tools.hpp>
#include <boost/test/execution_monitor.hpp>
#include <boost/test/utils/trivial_singleton.hpp>
#include <boost/exception/enable_current_exception.hpp>
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,