diff options
Diffstat (limited to 'src/core/common/Function.cpp')
-rw-r--r-- | src/core/common/Function.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/common/Function.cpp b/src/core/common/Function.cpp index eeabbc3..6aedb7b 100644 --- a/src/core/common/Function.cpp +++ b/src/core/common/Function.cpp @@ -17,9 +17,19 @@ */ #include "Function.hpp" +#include "Logger.hpp" namespace ousia { - +Variant::arrayType &ValidatingFunction::validate(Variant::arrayType &args) const +{ + // If an argument descriptor was given, use it to validate the arguments. + // Throw any violation as exception. + if (checkArguments) { + ExceptionLogger logger; + arguments.validateArray(args, logger); + } + return args; +} } |