Skip to content

Commit

Permalink
- Add source information to illegal algorithm section error.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12949 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Sep 17, 2012
1 parent 76a62a4 commit d06afad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/FrontEnd/InstSection.mo
Expand Up @@ -2228,6 +2228,7 @@ algorithm
DAE.ElementSource source "the origin of the element";
DAE.DAElist dae;
String s;
Absyn.Info info;

case (cache,env,ih,_,pre,csets,ci_state,SCode.ALGORITHM(statements = statements),impl,unrollForLoops,graph) /* impl */
equation
Expand All @@ -2246,7 +2247,8 @@ algorithm
equation
failure(_ = ClassInf.trans(ci_state,ClassInf.FOUND_ALGORITHM()));
s = ClassInf.printStateStr(ci_state);
Error.addMessage(Error.ALGORITHM_TRANSITION_FAILURE,{s});
info = SCode.getStatementInfo(stmt);
Error.addSourceMessage(Error.ALGORITHM_TRANSITION_FAILURE, {s}, info);
then fail();

case (_,_,_,_,_,_,_,algSCode,_,_,_)
Expand Down

0 comments on commit d06afad

Please sign in to comment.