diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-01 22:51:30 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-01 22:51:30 (GMT) |
commit | 945160d0539ad119ffc986fac712db76c7203e84 (patch) | |
tree | c43e4a7db898026bc62cc20af5061d07736f847e /src/uscxml/plugins/ioprocessor | |
parent | c70d02010ea99e6c8e35da3b767f41f1ee5dce56 (diff) | |
download | uscxml-945160d0539ad119ffc986fac712db76c7203e84.zip uscxml-945160d0539ad119ffc986fac712db76c7203e84.tar.gz uscxml-945160d0539ad119ffc986fac712db76c7203e84.tar.bz2 |
More polishing for bindings C# and Java
Diffstat (limited to 'src/uscxml/plugins/ioprocessor')
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp | 4 | ||||
-rw-r--r-- | src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp | 13 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp index 5ee7357..bd62467 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp @@ -157,7 +157,7 @@ bool BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { if (reqEvent.name.length() == 0) reqEvent.name = "http." + req.data.compound.at("type").atom; - returnEvent(reqEvent); + returnEvent(reqEvent, true); evhttp_send_reply(req.evhttpReq, 200, "OK", NULL); return true; } @@ -287,7 +287,7 @@ void BasicHTTPIOProcessor::downloadCompleted(const URL& url) { Event event; event.data = url; event.name = "HTTP." + statusPrefix + "." + statusRest; - returnEvent(event); +// returnEvent(event); } _sendRequests.erase(reqIter); return; diff --git a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp index becc00a..00b47f4 100644 --- a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.cpp @@ -129,10 +129,10 @@ void SCXMLIOProcessor::send(const SendRequest& req) { boost::shared_ptr<InterpreterImpl> other = instances[sessionId].lock(); other->receive(reqCopy); } else { - LOG(ERROR) << "Can not send to scxml session " << sessionId << " - not known" << std::endl; - Event error("error.communication", Event::PLATFORM); + ERROR_COMMUNICATION(error, "Can not send to scxml session " + sessionId + " - not known"); error.sendid = reqCopy.sendid; _interpreter->receiveInternal(error); + } } else if (iequals(reqCopy.target, "#_parent")) { /** @@ -143,8 +143,7 @@ void SCXMLIOProcessor::send(const SendRequest& req) { if (_interpreter->_parentQueue != NULL) { _interpreter->_parentQueue->push(reqCopy); } else { - LOG(ERROR) << "Can not send to parent, we were not invoked" << std::endl; - Event error("error.communication", Event::PLATFORM); + ERROR_COMMUNICATION(error, "Can not send to parent, we were not invoked or no parent queue is set"); error.sendid = reqCopy.sendid; _interpreter->receiveInternal(error); } @@ -167,8 +166,7 @@ void SCXMLIOProcessor::send(const SendRequest& req) { LOG(ERROR) << "Exception caught while sending event to invoker " << invokeId; } } else { - LOG(ERROR) << "Can not send to invoked component '" << invokeId << "', no such invokeId" << std::endl; - Event error("error.communication", Event::PLATFORM); + ERROR_COMMUNICATION(error, "Can not send to invoked component '" + invokeId + "', no such invokeId"); error.sendid = reqCopy.sendid; _interpreter->receiveInternal(error); } @@ -177,8 +175,7 @@ void SCXMLIOProcessor::send(const SendRequest& req) { if (target.isAbsolute()) { BasicHTTPIOProcessor::send(reqCopy); } else { - LOG(ERROR) << "Not sure what to make of the target '" << reqCopy.target << "' - raising error" << std::endl; - Event error("error.execution", Event::PLATFORM); + ERROR_EXECUTION(error, "Not sure what to make of the target '" + reqCopy.target + "' - raising error"); error.sendid = reqCopy.sendid; // test 159 still fails // _interpreter->receiveInternal(error); |