From 5dabe6ba2c1c499fd7df342d1846a5e8340c62b0 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Wed, 6 May 2015 16:37:38 -0400 Subject: [PATCH] better error messages --- include/fc/rpc/api_connection.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fc/rpc/api_connection.hpp b/include/fc/rpc/api_connection.hpp index fd67072..c037c22 100644 --- a/include/fc/rpc/api_connection.hpp +++ b/include/fc/rpc/api_connection.hpp @@ -112,14 +112,14 @@ namespace fc { template R call_generic( const std::function,Args...)>& f, variants::const_iterator a0, variants::const_iterator e ) { - FC_ASSERT( a0 != e ); + FC_ASSERT( a0 != e, "too few arguments passed to method" ); detail::callback_functor arg0( *this, a0->as() ); return call_generic( this->bind_first_arg,Args...>( f, std::function(arg0) ), a0+1, e ); } template R call_generic( const std::function&,Args...)>& f, variants::const_iterator a0, variants::const_iterator e ) { - FC_ASSERT( a0 != e ); + FC_ASSERT( a0 != e, "too few arguments passed to method" ); detail::callback_functor arg0( get_connection(), a0->as() ); return call_generic( this->bind_first_arg&,Args...>( f, arg0 ), a0+1, e ); } @@ -127,7 +127,7 @@ namespace fc { template R call_generic( const std::function& f, variants::const_iterator a0, variants::const_iterator e ) { - FC_ASSERT( a0 != e ); + FC_ASSERT( a0 != e, "too few arguments passed to method" ); return call_generic( this->bind_first_arg( f, a0->as< typename std::decay::type >() ), a0+1, e ); }