aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceparser.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-04-27 09:11:23 +0200
committerRenaud G <renaud@rolisteam.org>2015-04-27 09:11:23 +0200
commit5c73a6cb13b8c301d0e60f916998c3e683a2b043 (patch)
tree6115fd997abb2cd15f733a0e4f4ff719633fe191 /diceparser.cpp
parenta0ee95a348aa457a584e349f4f832e77c85d58a2 (diff)
downloadOneRoll-5c73a6cb13b8c301d0e60f916998c3e683a2b043.tar.gz
OneRoll-5c73a6cb13b8c301d0e60f916998c3e683a2b043.zip
-management of runtime error
Diffstat (limited to 'diceparser.cpp')
-rw-r--r--diceparser.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/diceparser.cpp b/diceparser.cpp
index a946b86..ebe2e0e 100644
--- a/diceparser.cpp
+++ b/diceparser.cpp
@@ -179,7 +179,7 @@ bool DiceParser::parseLine(QString str)
}
else
{
- return false;
+ return false;
}
}
@@ -862,9 +862,9 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)/
return isFine;
}
-QList<ExecutionNode::ERROR_CODE> DiceParser::getErrorList()
+QMap<ExecutionNode::ERROR_CODE,QString> DiceParser::getErrorMap()
{
- return m_start->getErrorList();
+ return m_start->getExecutionErrorMap();
}
QString DiceParser::humanReadableError()
{
@@ -876,6 +876,15 @@ QString DiceParser::humanReadableError()
str.append(i.value());
str.append("\n");
}
+
+ ///list
+ QMapIterator<ExecutionNode::ERROR_CODE,QString> j(getErrorMap());
+ while(j.hasNext())
+ {
+ j.next();
+ str.append(j.value());
+ str.append("\n");
+ }
return str;
}