From f4d2d10120a84d5bef0f7e4693064d10ac03f520 Mon Sep 17 00:00:00 2001 From: Peter Aronsson Date: Fri, 10 Nov 2006 08:51:36 +0000 Subject: [PATCH] Added better errormessage to checkModel git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2594 f25d12d1-65f4-0310-ae8a-bbce733d8d8e --- Compiler/Ceval.mo | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Compiler/Ceval.mo b/Compiler/Ceval.mo index d43410fb00d..cf3b2b993e3 100644 --- a/Compiler/Ceval.mo +++ b/Compiler/Ceval.mo @@ -2555,9 +2555,13 @@ algorithm varSizeStr," variable(s)."}); then (cache,Values.STRING(retStr),st); - case (cache,_,_,st,_) - - then (cache,Values.STRING("Check of model failed."),st); + case (cache,_,_,st,_) local + String errorMsg; Boolean strEmpty; + equation + errorMsg = Error.printMessagesStr(); + strEmpty = (System.strcmp("",errorMsg)==0); + errorMsg = Util.if_(strEmpty,"Internal error, check of model failed with no error message.",errorMsg); + then (cache,Values.STRING(errorMsg),st); end matchcontinue; end checkModel;