summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Interpreter.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-08 17:44:23 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-10-08 17:44:23 (GMT)
commit9479a0d91c1bb9241324dea4f92b50405d17e97b (patch)
tree5d7e85b1ecfff44d352466246ee1c41e281a156a /src/uscxml/Interpreter.cpp
parent8daf2ea0a7192e556cc059c2220469ea22155380 (diff)
downloaduscxml-9479a0d91c1bb9241324dea4f92b50405d17e97b.zip
uscxml-9479a0d91c1bb9241324dea4f92b50405d17e97b.tar.gz
uscxml-9479a0d91c1bb9241324dea4f92b50405d17e97b.tar.bz2
Pass more ECMAScript W3C tests
Diffstat (limited to 'src/uscxml/Interpreter.cpp')
-rw-r--r--src/uscxml/Interpreter.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp
index 065b61e..b23ccd7 100644
--- a/src/uscxml/Interpreter.cpp
+++ b/src/uscxml/Interpreter.cpp
@@ -914,6 +914,8 @@ void InterpreterImpl::delayedSend(void* userdata, std::string eventName) {
if (ioProc) {
try {
ioProc.send(sendReq);
+ } catch(Event e) {
+ throw e;
} catch(...) {
LOG(ERROR) << "Exception caught while sending event to ioprocessor " << sendReq.type;
}
@@ -1157,7 +1159,10 @@ void InterpreterImpl::executeContent(const NodeList<std::string>& content, bool
for (unsigned int i = 0; i < content.getLength(); i++) {
if (content.item(i).getNodeType() != Node_base::ELEMENT_NODE)
continue;
- executeContent(content.item(i), rethrow);
+ try {
+ executeContent(content.item(i), true);
+ }
+ CATCH_AND_DISTRIBUTE("Error when executing content");
}
}
@@ -1165,7 +1170,10 @@ void InterpreterImpl::executeContent(const NodeSet<std::string>& content, bool r
for (unsigned int i = 0; i < content.size(); i++) {
if (content[i].getNodeType() != Node_base::ELEMENT_NODE)
continue;
- executeContent(content[i], rethrow);
+ try {
+ executeContent(content[i], true);
+ }
+ CATCH_AND_DISTRIBUTE("Error when executing content");
}
}
@@ -1246,7 +1254,7 @@ void InterpreterImpl::executeContent(const Arabica::DOM::Node<std::string>& cont
_dataModel.setForeach(item, array, index, iteration);
if (content.hasChildNodes())
// execute content and have exception rethrown to break foreach
- executeContent(content.getChildNodes(), true);
+ executeContent(content.getChildNodes(), rethrow);
}
_dataModel.popContext(); // leave stacked context
}