aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cli/main.cpp')
-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);