Skip to content

Commit

Permalink
- DAELowUtil.mo
Browse files Browse the repository at this point in the history
  - improve Error Msg and use flag checkDAELow for now to keep testsuit running

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6610 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 26, 2010
1 parent 02720a0 commit 6f46b00
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Compiler/DAELowUtil.mo
Expand Up @@ -53,6 +53,9 @@ public import Util;
public import DAELow;

protected import Debug;
protected import Error;
protected import RTOpts;
protected import System;

public function checkDAELowWithErrorMsg"function: checkDAELowWithErrorMsg
author: Frenkel TUD
Expand All @@ -76,13 +79,21 @@ algorithm
list<DAE.ComponentRef> crefs;
list<tuple<DAE.Exp,list<DAE.ComponentRef>>> res;
list<String> strcrefs;
String crefstring, expstr,scopestr;
case ({}) then ();
case (((e,crefs))::res)
equation
false = RTOpts.debugFlag("checkDAELow");
then
();
case (((e,crefs))::res)
equation
print("Error in Exp ");
print(Exp.printExpStr(e));print("\n Variables: ");
true = RTOpts.debugFlag("checkDAELow");
strcrefs = Util.listMap(crefs,Exp.crefStr);
print(Util.stringDelimitList(strcrefs,", "));print("\nnot found in DAELow object.\n");
crefstring = Util.stringDelimitList(strcrefs,", ");
expstr = Exp.printExpStr(e);
scopestr = System.stringAppendList({crefstring," from Expression: ",expstr});
Error.addMessage(Error.LOOKUP_VARIABLE_ERROR, {scopestr,"DAELow object"});
printcheckDAELowWithErrorMsg(res);
then
();
Expand Down

0 comments on commit 6f46b00

Please sign in to comment.