diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-13 02:01:30 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-13 02:01:30 +0100 |
commit | dcf154aaf037ac67260abcec0b0ed3db32bc65ac (patch) | |
tree | 94dd32865be508d70617c351c609f398c9ec6f06 /src/core/common/Function.cpp | |
parent | 742b76b006daf27ea19b2834e56696cb3c5a0e18 (diff) |
allowing validated methods
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; +} } |