MopeSWTP-SS21 / MopeSWTP

MIT License
1 stars 0 forks source link

Show full message for checkModel #72

Open CSchoel opened 3 years ago

CSchoel commented 3 years ago

Steps to reproduce (console client)

Expected behavior

The following full error message should be displayed (assuming that the wrong version of the MSL is loaded, as is currently the case):

Notification: Automatically loaded package SHMConduction default due to uses annotation.
[/home/cslz90/Documents/Promotion/code/modelica-deploy/SHMConduction/Components/Pacemaker.mo:7:3-7:31:writable] Error: Import Modelica.SIunits not found in scope <top>.
[/home/cslz90/Documents/Promotion/code/modelica-deploy/SHMConduction/Components/Pacemaker.mo:10:3-11:46:writable] Error: Class SI.Time not found in scope Pacemaker.

Actual behavior

The client only shows the first line of the error message:

->Notification: Automatically loaded package SHMConduction default due to uses annotation.
CSchoel commented 3 years ago

Hmm... interestingly enough, a second checkModel for this class returns

->"Check of SHMConduction.Components.Pacemaker completed successfully.
Class SHMConduction.Components.Pacemaker has 3 equation(s) and 3 variable(s).
0 of these are trivial equation(s)."

So the issue might not be that the message is cut off after the first line but rather that the client cannot handle the case where getErrorString() only contains notifications/warnings, but checkModel still returns a normal check result.