Skip to content

Commit

Permalink
Print better error-message if things go wrong
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16007 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 9, 2013
1 parent 12aeb11 commit 6274b01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Compiler/Template/CodegenC.tpl
Expand Up @@ -8619,9 +8619,11 @@ end expTypeFromOpFlag;
template dimension(Dimension d)
::=
match d
case DAE.DIM_BOOLEAN(__) then '2'
case DAE.DIM_INTEGER(__) then integer
case DAE.DIM_ENUM(__) then size
case DAE.DIM_UNKNOWN(__) then error(sourceInfo(),"Unknown dimensions may not be part of generated code. This is most likely an error on the part of OpenModelica. Please submit a detailed bug-report.")
case DAE.DIM_EXP(exp=e) then error(sourceInfo(), 'dimension: INVALID_DIMENSION <%printExpStr(e)%>')
else error(sourceInfo(), 'dimension: INVALID_DIMENSION')
end dimension;

Expand Down
4 changes: 4 additions & 0 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -1588,6 +1588,10 @@ package DAE
Integer size;
end DIM_ENUM;

record DIM_EXP
Exp exp;
end DIM_EXP;

record DIM_UNKNOWN
end DIM_UNKNOWN;
end Dimension;
Expand Down

0 comments on commit 6274b01

Please sign in to comment.