better error messages
This commit is contained in:
parent
4df08d8efe
commit
5dabe6ba2c
1 changed files with 3 additions and 3 deletions
|
|
@ -112,14 +112,14 @@ namespace fc {
|
||||||
template<typename R, typename Signature, typename ... Args>
|
template<typename R, typename Signature, typename ... Args>
|
||||||
R call_generic( const std::function<R(std::function<Signature>,Args...)>& f, variants::const_iterator a0, variants::const_iterator e )
|
R call_generic( const std::function<R(std::function<Signature>,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<Signature> arg0( *this, a0->as<uint64_t>() );
|
detail::callback_functor<Signature> arg0( *this, a0->as<uint64_t>() );
|
||||||
return call_generic<R,Args...>( this->bind_first_arg<R,std::function<Signature>,Args...>( f, std::function<Signature>(arg0) ), a0+1, e );
|
return call_generic<R,Args...>( this->bind_first_arg<R,std::function<Signature>,Args...>( f, std::function<Signature>(arg0) ), a0+1, e );
|
||||||
}
|
}
|
||||||
template<typename R, typename Signature, typename ... Args>
|
template<typename R, typename Signature, typename ... Args>
|
||||||
R call_generic( const std::function<R(const std::function<Signature>&,Args...)>& f, variants::const_iterator a0, variants::const_iterator e )
|
R call_generic( const std::function<R(const std::function<Signature>&,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<Signature> arg0( get_connection(), a0->as<uint64_t>() );
|
detail::callback_functor<Signature> arg0( get_connection(), a0->as<uint64_t>() );
|
||||||
return call_generic<R,Args...>( this->bind_first_arg<R,const std::function<Signature>&,Args...>( f, arg0 ), a0+1, e );
|
return call_generic<R,Args...>( this->bind_first_arg<R,const std::function<Signature>&,Args...>( f, arg0 ), a0+1, e );
|
||||||
}
|
}
|
||||||
|
|
@ -127,7 +127,7 @@ namespace fc {
|
||||||
template<typename R, typename Arg0, typename ... Args>
|
template<typename R, typename Arg0, typename ... Args>
|
||||||
R call_generic( const std::function<R(Arg0,Args...)>& f, variants::const_iterator a0, variants::const_iterator e )
|
R call_generic( const std::function<R(Arg0,Args...)>& 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<R,Args...>( this->bind_first_arg<R,Arg0,Args...>( f, a0->as< typename std::decay<Arg0>::type >() ), a0+1, e );
|
return call_generic<R,Args...>( this->bind_first_arg<R,Arg0,Args...>( f, a0->as< typename std::decay<Arg0>::type >() ), a0+1, e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue