aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli
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 /cli
parenta0ee95a348aa457a584e349f4f832e77c85d58a2 (diff)
downloadOneRoll-5c73a6cb13b8c301d0e60f916998c3e683a2b043.tar.gz
OneRoll-5c73a6cb13b8c301d0e60f916998c3e683a2b043.zip
-management of runtime error
Diffstat (limited to 'cli')
-rw-r--r--cli/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/main.cpp b/cli/main.cpp
index 0812059..94fcc00 100644
--- a/cli/main.cpp
+++ b/cli/main.cpp
@@ -91,6 +91,12 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight)
if(treeFile.isEmpty())
{
parser->Start();
+ if(!parser->getErrorMap().isEmpty())
+ {
+ qDebug() << "Error" << parser->humanReadableError();
+ return;
+ }
+
ExportedDiceResult list;
parser->getLastDiceResult(list);
QString diceText = diceToText(list);