Skip to content

Commit

Permalink
Add error case for dump function (#849)
Browse files Browse the repository at this point in the history
- Dump functions should not be able to fail silently.
  - Added error message to `dumpMarkedVarList`
  • Loading branch information
AnHeuermann committed May 9, 2020
1 parent 02f5941 commit 9af1c38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion OMCompiler/Compiler/BackEnd/BackendDump.mo
Expand Up @@ -3359,7 +3359,13 @@ protected
BackendDAE.Var var;
algorithm
for sel in selList loop
var := listGet(varList, sel);
try
var := listGet(varList, sel);
else
Error.addInternalError("function dumpMarkedVarList failed", sourceInfo());
Error.addCompilerNotification("Could not get variable " + intString(sel) + " from varList \n" + varListString(varList,""));
fail();
end try;
outString := outString + " " + varString(var) + "\n";
end for;
end dumpMarkedVarList;
Expand Down

0 comments on commit 9af1c38

Please sign in to comment.