From 729caaacffdb51850b3c4843eed864e995e88410 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 24 Jul 2015 12:14:44 -0700 Subject: [PATCH] Add THROW contract call --- src/ripple/basics/contract.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ripple/basics/contract.h b/src/ripple/basics/contract.h index a4a7a849ea..9b65e826c3 100644 --- a/src/ripple/basics/contract.h +++ b/src/ripple/basics/contract.h @@ -43,12 +43,11 @@ throwException( } // detail -template +template void Throw (Args&&... args) { - throwException( + detail::throwException( std::make_exception_ptr( Exception(std::forward< Args>(args)...))); @@ -59,6 +58,11 @@ void LogicError ( std::string const& how); +/** Called to throw an exception. */ +#ifndef THROW +#define THROW(T, arg) Throw(arg) +#endif + } // ripple #endif