#1464 closed defect (fixed)
OMEdit: Clickable error messages
Reported by: | Martin Sjölund | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: | Martin Sjölund |
Description
Simulation failed for model: abc [abc.mo:2:3-2:15:writable] Error: Type mismatch in equation r=\"x\" of type Real=String Error: Error occured while flattening model abc
It should of course be possible to click the abc.mo:2:3-2:15 to instantly modify the sources...
Attachments (2)
Change History (20)
comment:1 by , 10 years ago
Cc: | sjoelund.se, → sjoelund.se |
---|---|
Component: | → OMEdit |
Milestone: | → Future |
Version: | → trunk |
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 4 comment:3 by , 10 years ago
comment:4 by , 10 years ago
Replying to adeas31:
Can you test with the latest version? We do have clickable error messages now.
I created a simple model with an error in OMEdit:
model M Integer i = "fish"; end M;
Instantiating the model pops up a window with the error in it (why not in the message browser?), but the error is not clickable. Simulating the model shows the error in the message browser instead, still not clickable.
by , 10 years ago
comment:5 by , 10 years ago
I just created a new model in OMEdit, switched to text-view, pasted your code and clicked on simulate. I get a clickable error message. See the attached image error.png
follow-ups: 8 10 comment:6 by , 10 years ago
It is only clickable if the model has not been saved to disk. If you save it, you just get unclickable text:
[2] 17:18:28 Translation Error [/home/martin/tmp/M.mo: 2:3-2:21]: Type mismatch in binding i = "fish", expected subtype of Integer, got type String.
by , 10 years ago
Attachment: | OMEdit_screen.png added |
---|
follow-up: 9 comment:8 by , 10 years ago
Replying to sjoelund.se:
It is only clickable if the model has not been saved to disk.
OMEdit refuses to simulate a model for me unless it's saved to disk.
comment:9 by , 10 years ago
Replying to perost:
OMEdit refuses to simulate a model for me unless it's saved to disk.
You can change that in settings
comment:10 by , 10 years ago
Replying to sjoelund.se:
It is only clickable if the model has not been saved to disk. If you save it, you just get unclickable text:
[2] 17:18:28 Translation Error [/home/martin/tmp/M.mo: 2:3-2:21]: Type mismatch in binding i = "fish", expected subtype of Integer, got type String.
Yeah for that I need an API which takes the fileName and error location and return me the qualified path since the error could be inside a package.
comment:12 by , 10 years ago
Replying to sjoelund.se:
Or you could open the file and show it...
No, that will lead to more problems. Because then people want to update it and simulate and etc. etc.
comment:13 by , 10 years ago
But that's what we want in the end anyway. Why shouldn't you be able to edit a Modelica file in OMEdit?
comment:15 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Only sort of working. Loading the following file points to the wrong line number:
model M Real r = 1.5; Integer i = "fish"; end M;
comment:17 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:18 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Can you test with the latest version? We do have clickable error messages now.