Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit d5f9643

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Return error value when FMU compilation fails
1 parent a317639 commit d5f9643

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Compiler/Script/CevalScriptBackend.mo

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3143,7 +3143,13 @@ algorithm
31433143
Error.addMessage(Error.SIMULATOR_BUILD_ERROR, {System.readFile(logfile)});
31443144
return;
31453145
end if;
3146-
CevalScript.compileModel(filenameprefix, libs, workingDir=fmutmp+"/sources", makeVars={});
3146+
try
3147+
CevalScript.compileModel(filenameprefix, libs, workingDir=fmutmp+"/sources", makeVars={});
3148+
else
3149+
outValue := Values.STRING("");
3150+
Error.addMessage(Error.SIMULATOR_BUILD_ERROR, {System.readFile(logfile)});
3151+
return;
3152+
end try;
31473153
end for;
31483154

31493155
System.removeDirectory(fmutmp);

0 commit comments

Comments
 (0)