summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2015-07-08 20:03:03 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2015-07-08 20:03:03 (GMT)
commit57ba362eae6e8209cf560555fd4cc4bb76dbe2a1 (patch)
tree00a2e2c5fd6993a5ee118df147cae3ef6e9cca9a /src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
parentf02d7e5919f16d8396839fcff1e0588d6ccf3004 (diff)
downloaduscxml-57ba362eae6e8209cf560555fd4cc4bb76dbe2a1.zip
uscxml-57ba362eae6e8209cf560555fd4cc4bb76dbe2a1.tar.gz
uscxml-57ba362eae6e8209cf560555fd4cc4bb76dbe2a1.tar.bz2
done.event bug and prolog tests
Fixed the done.event bug and added first prolog transformed IRP tests
Diffstat (limited to 'src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp')
-rw-r--r--src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
index f6131f8..21b390a 100644
--- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
@@ -689,7 +689,9 @@ bool SWIDataModel::evalAsBool(const Arabica::DOM::Element<std::string>& node, co
}
PlQuery query(compound.name(), termv);
return query.next_solution() > 0;
- } catch(...) {
+ }
+ RETHROW_PLEX_AS_EVENT
+ catch(...) {
return false;
}
}
@@ -823,7 +825,7 @@ void SWIDataModel::assign(const Element<std::string>& assignElem,
PlCall(dataInitStr.str().c_str());
} else {
// treat content as . seperated facts
- std::stringstream factStream(content);
+ std::stringstream factStream(expr);
std::string item;
while(std::getline(factStream, item, '.')) {
std::string fact = boost::trim_copy(item);