Skip to content

Commit

Permalink
... continuation from the previous commit (I hit enter accidentally)
Browse files Browse the repository at this point in the history
- added templateError() imported function 
  to be used inside templates to report an "unexpected template error", 
  usage is like this:
  
  match arg
  case pattern  then << a template ... >>
  case pattern2 then << a template ... >>
  else templateError("unknown case in this template")

  templates still won't fail, 
  but the call to the template invoking functions tplNoret() and tplStringX() 
  will fail when an error is reported during the template processing
  


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8233 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
pavolpr committed Mar 15, 2011
1 parent f7550cf commit 954dff9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Compiler/Template/Tpl.mo
Expand Up @@ -1550,6 +1550,7 @@ public function tplString
replaceable type Type_a subtypeof Any;
end Tpl_Fun;
replaceable type Type_a subtypeof Any;

protected
Text txt;
Integer nErr;
Expand Down

0 comments on commit 954dff9

Please sign in to comment.