Opened 10 years ago
Closed 7 years ago
#3235 closed defect (wontfix)
Fix test cases with error messages that include line numbers from the compiler
Reported by: | Per Östlund | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | *unknown* | Version: | trunk |
Keywords: | Cc: | Lennart Ochel, Willi Braun, Volker Waurich |
Description (last modified by )
I have disabled some test cases that have error messages in them which include line numbers from the compiler. This means that the test cases needs to be updated every time the corresponding source files are changed in the compiler, which is not acceptable. Internal errors should really only be used for things which shouldn't fail, and not used as failtraces.
So either the compiler needs to be fixed so it doesn't print out internal errors for these models, or the models needs to be fixed. The models are:
simulation/modelica/indexreduction/ImplicitStateCoupling.mos simulation/libraries/3rdParty/MathematicalAspects/01_AlgebraicLoopBoolean.mos openmodelica/typed-API/SolveLinearSystem.mos simulation/modelica/algorithms_functions/algorithms.mos openmodelica/modelicaML/watchdog.mos
Change History (10)
comment:1 by , 10 years ago
follow-up: 4 comment:2 by , 10 years ago
Thanks for adressing this issue. I appreciate these recommendation to get a more consistent coding style. Could you add this to the style guide?
comment:3 by , 10 years ago
I will just note that a lot of the addInternalError calls were added by me; they were often replacing print statements (which is worse than just failtrace).
follow-up: 8 comment:7 by , 10 years ago
This could be easily fixed: for flag --running-testsuite *do not show the line numbers*
for the errors added with Error.addInternalError.
comment:8 by , 10 years ago
Replying to adrpo:
This could be easily fixed: for flag --running-testsuite *do not show the line numbers*
for the errors added with Error.addInternalError.
Sure, but that's just a workaround. I don't think we should be using internal errors as failtraces, it causes the actual error messages to be buried beneath all the other errors that are of no consequence to the users.
comment:9 by , 10 years ago
Of course. What I mean is that we could fix the problem until somebody has time to look at all the internal errors and make them proper errors instead.
comment:10 by , 7 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
It seems like this ticket is totally obsolete
Also, the following pattern is often used in the front end:
I.e. only print an internal error if the called code fails without printing an error of its own. This is probably a pattern which should be used more in the backend, considering that getNumErrorMessages is used five times in the whole backend, while internal errors are used in ~250 places.