Opened 14 years ago

Closed 10 years ago

Last modified 7 years ago

#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)

error.png (35.7 KB ) - added by Adeel Asghar 10 years ago.
OMEdit_screen.png (69.5 KB ) - added by Per Östlund 10 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 by Per Östlund, 10 years ago

Cc: sjoelund.se, → sjoelund.se
Component: OMEdit
Milestone: Future
Version: trunk

comment:2 by Per Östlund, 10 years ago

Owner: changed from Martin Sjölund to Adeel Asghar
Status: newassigned

comment:3 by Adeel Asghar, 10 years ago

Can you test with the latest version? We do have clickable error messages now.

in reply to:  3 comment:4 by Per Östlund, 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 Adeel Asghar, 10 years ago

Attachment: error.png added

comment:5 by Adeel Asghar, 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

comment:6 by Martin Sjölund, 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 Per Östlund, 10 years ago

Attachment: OMEdit_screen.png added

comment:7 by Per Östlund, 10 years ago

Here's how it looks for me.

in reply to:  6 ; comment:8 by Per Östlund, 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.

in reply to:  8 comment:9 by Martin Sjölund, 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

in reply to:  6 comment:10 by Adeel Asghar, 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:11 by Martin Sjölund, 10 years ago

Or you could open the file and show it...

in reply to:  11 comment:12 by Adeel Asghar, 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 Martin Sjölund, 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:14 by Adeel Asghar, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r25314.

comment:15 by Martin Sjölund, 10 years ago

Resolution: fixed
Status: closedreopened

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:16 by Adeel Asghar, 10 years ago

Resolution: fixed
Status: reopenedclosed

comment:17 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.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 Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.