Skip to content

Commit

Permalink
Added better errormessage to checkModel
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2594 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Nov 10, 2006
1 parent fc30e71 commit f4d2d10
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Compiler/Ceval.mo
Expand Up @@ -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;
Expand Down

0 comments on commit f4d2d10

Please sign in to comment.