projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement dynamic procedure at REST interface
[anna.git]
/
dynamic
/
launcher
/
default
/
Procedure.cpp
diff --git
a/dynamic/launcher/default/Procedure.cpp
b/dynamic/launcher/default/Procedure.cpp
index
57bb7e0
..
6649e62
100644
(file)
--- a/
dynamic/launcher/default/Procedure.cpp
+++ b/
dynamic/launcher/default/Procedure.cpp
@@
-9,11
+9,14
@@
#include <iostream>
#include <string>
#include <iostream>
#include <string>
+// Project
+#include <anna/core/Exception.hpp>
+
// Local
#include "Procedure.hpp"
// Local
#include "Procedure.hpp"
-void Procedure::execute(const std::string &args, std::string &response) throw() {
+void Procedure::execute(const std::string &args, std::string &response) throw(
anna::RuntimeException
) {
response = "Empty default implementation. Make dynamic library and reimplement this method.";
if (args != "" ) {
response += " Provided argument(s) ignored: ";
response = "Empty default implementation. Make dynamic library and reimplement this method.";
if (args != "" ) {
response += " Provided argument(s) ignored: ";
@@
-21,3
+24,6
@@
void Procedure::execute(const std::string &args, std::string &response) throw()
}
}
}
}
+void Procedure::execute(const nlohmann::json &args, std::string &response) throw(anna::RuntimeException) {
+ execute(args.dump(), response);
+}