summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/AgentEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qmf/AgentEvent.cpp')
-rw-r--r--qpid/cpp/src/qmf/AgentEvent.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qpid/cpp/src/qmf/AgentEvent.cpp b/qpid/cpp/src/qmf/AgentEvent.cpp
index fbdce686d4..2dc24ecac1 100644
--- a/qpid/cpp/src/qmf/AgentEvent.cpp
+++ b/qpid/cpp/src/qmf/AgentEvent.cpp
@@ -21,6 +21,7 @@
#include "qmf/AgentEventImpl.h"
#include "qmf/PrivateImplRef.h"
+#include "qmf/SchemaImpl.h"
using namespace std;
using namespace qmf;
@@ -64,6 +65,8 @@ Data AgentEventImpl::dequeueData()
void AgentEventImpl::addReturnArgument(const string& key, const Variant& val, const string& subtype)
{
+ if (schema.isValid() && !SchemaImplAccess::get(schema).isValidMethodOutArg(methodName, key, val))
+ throw QmfException("Output argument is unknown or the type is incompatible");
outArguments[key] = val;
if (!subtype.empty())
outArgumentSubtypes[key] = subtype;