Skip to content

Commit ac1663d

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Provide more information for invalid roots
1 parent eb3f80f commit ac1663d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Compiler/Template/CodegenCFunctions.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4951,7 +4951,7 @@ case BINARY(__) then
49514951
{
49524952
<%if acceptMetaModelicaGrammar()
49534953
then '<%generateThrow()%>;<%\n%>'
4954-
else 'throwStreamPrint(threadData, "Invalid root: (%g)^(%g)", <%tmp1%>, <%tmp2%>);<%\n%>'%>
4954+
else 'throwStreamPrint(threadData, "%s:%d: Invalid root: (%g)^(%g)", __FILE__, __LINE__, <%tmp1%>, <%tmp2%>);<%\n%>'%>
49554955
}
49564956
}
49574957
}
@@ -4963,7 +4963,7 @@ case BINARY(__) then
49634963
{
49644964
<%if acceptMetaModelicaGrammar()
49654965
then '<%generateThrow()%>;<%\n%>'
4966-
else 'throwStreamPrint(threadData, "Invalid root: (%g)^(%g)", <%tmp1%>, <%tmp2%>);<%\n%>'%>
4966+
else 'throwStreamPrint(threadData, "%s:%d: Invalid root: (%g)^(%g)", __FILE__, __LINE__, <%tmp1%>, <%tmp2%>);<%\n%>'%>
49674967
}
49684968
>>
49694969
'<%tmp3%>'

0 commit comments

Comments
 (0)