summaryrefslogtreecommitdiffstats
path: root/src/uscxml/messages
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-12-12 15:19:14 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-12-12 15:19:14 (GMT)
commit047a35fc691a348008cbfbf4c3d7722a6ec4f93e (patch)
tree362a55496c4185b0be5966073d43d00e1b0e27de /src/uscxml/messages
parentdcac58f473789dd07e9094e61f819aef2fbc4b4a (diff)
downloaduscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.zip
uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.tar.gz
uscxml-047a35fc691a348008cbfbf4c3d7722a6ec4f93e.tar.bz2
Custom logging for interpreters
Diffstat (limited to 'src/uscxml/messages')
-rw-r--r--src/uscxml/messages/Data.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp
index 5d7dbf2..b2d08e4 100644
--- a/src/uscxml/messages/Data.cpp
+++ b/src/uscxml/messages/Data.cpp
@@ -101,7 +101,7 @@ Data Data::fromJSON(const std::string& jsonString) {
}
t = (jsmntok_t*)malloc((nrTokens + 1) * sizeof(jsmntok_t));
if (t == NULL) {
- LOG(USCXML_ERROR) << "Cannot parse JSON, ran out of memory!";
+ throw ErrorEvent("Cannot parse JSON, ran out of memory!");
return data;
}
memset(t, 0, (nrTokens + 1) * sizeof(jsmntok_t));
@@ -112,13 +112,13 @@ Data Data::fromJSON(const std::string& jsonString) {
if (rv != 0) {
switch (rv) {
case JSMN_ERROR_NOMEM:
- LOG(USCXML_ERROR) << "Cannot parse JSON, not enough tokens were provided!";
+ throw ErrorEvent("Cannot parse JSON, not enough tokens were provided!");
break;
case JSMN_ERROR_INVAL:
- LOG(USCXML_ERROR) << "Cannot parse JSON, invalid character inside JSON string!";
+ throw ErrorEvent("Cannot parse JSON, invalid character inside JSON string!");
break;
case JSMN_ERROR_PART:
- LOG(USCXML_ERROR) << "Cannot parse JSON, the string is not a full JSON packet, more bytes expected!";
+ throw ErrorEvent("Cannot parse JSON, the string is not a full JSON packet, more bytes expected!");
break;
default:
break;