diff options
Diffstat (limited to 'lib/callable.cpp')
-rw-r--r-- | lib/callable.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/callable.cpp b/lib/callable.cpp index a7bc7da..59ada7f 100644 --- a/lib/callable.cpp +++ b/lib/callable.cpp @@ -3,6 +3,7 @@ #include <gras/callable.hpp> #include <boost/foreach.hpp> #include <boost/shared_ptr.hpp> +#include <boost/format.hpp> #include <stdexcept> #include <map> @@ -62,3 +63,9 @@ CallableRegistryEntry::~CallableRegistryEntry(void) { //NOP } + +void CallableRegistryEntry::arg_check(const PMCList &args, const size_t nargs) +{ + if (args.size() != nargs) throw std::runtime_error(str(boost::format( + "callable expected %u arguments but for %u") % nargs % args.size())); +} |