aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--diceparser.cpp5
-rw-r--r--node/executionnode.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index 570c96b..4a972d6 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -172,13 +172,14 @@ bool DiceParser::parseLine(QString str)
}
}
- if(m_errorMap.isEmpty())
+ if((m_errorMap.isEmpty())&&(NULL!=newNode))
{
return true;
}
else
{
- return false;
+ m_errorMap.insert(ExecutionNode::NOTHING_UNDERSTOOD,QObject::tr("Nothing was understood"));
+ return false;
}
}
diff --git a/node/executionnode.h b/node/executionnode.h
index 834b062..39d714b 100644
--- a/node/executionnode.h
+++ b/node/executionnode.h
@@ -9,7 +9,7 @@
class ExecutionNode
{
public:
- enum ERROR_CODE {NO_ERROR,DIE_RESULT_EXPECTED,BAD_SYNTAXE,ENDLESS_LOOP_ERROR,DIVIDE_BY_ZERO};
+ enum ERROR_CODE {NO_ERROR,DIE_RESULT_EXPECTED,BAD_SYNTAXE,ENDLESS_LOOP_ERROR,DIVIDE_BY_ZERO,NOTHING_UNDERSTOOD};
/**
* @brief ExecutionNode
*/