From 5c73a6cb13b8c301d0e60f916998c3e683a2b043 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 27 Apr 2015 09:11:23 +0200 Subject: -management of runtime error --- cli/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/main.cpp') 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); -- cgit v1.2.3-70-g09d2