diff options
| -rw-r--r-- | include/diceparserhelper.h | 3 | ||||
| -rw-r--r-- | node/countexecutenode.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/diceparserhelper.h b/include/diceparserhelper.h index c55b415..4a481c1 100644 --- a/include/diceparserhelper.h +++ b/include/diceparserhelper.h @@ -26,7 +26,8 @@ enum class ERROR_CODE : int INVALID_INDEX, UNEXPECTED_CHARACTER, NO_PREVIOUS_ERROR, - NO_VALID_RESULT + NO_VALID_RESULT, + SCALAR_RESULT_EXPECTED }; /** diff --git a/node/countexecutenode.cpp b/node/countexecutenode.cpp index 7d684c6..b45fe37 100644 --- a/node/countexecutenode.cpp +++ b/node/countexecutenode.cpp @@ -23,6 +23,7 @@ void CountExecuteNode::run(ExecutionNode* previous) m_previousNode= previous; if(nullptr == previous) { + m_errors.insert(Dice::ERROR_CODE::NO_PREVIOUS_ERROR, QStringLiteral("No scalar result before Swith/Case operator")); return; } DiceResult* previousResult= dynamic_cast<DiceResult*>(previous->getResult()); |