THM-MoTE / mope-server

Server process for Modelica | Editor
https://thm-mote.github.io//projects/mope
GNU General Public License v3.0
9 stars 0 forks source link

Parse message from simulation #11

Closed njustus closed 5 years ago

njustus commented 5 years ago

When simulating a model.. parse the message because it could contain an error. Especially if the resultFile property is empty:

mope_1   | 2019-04-01 08:24:47,477 [DEBUG] d.t.m.c.OMCompiler [] - simulation returned: record SimulationResult
mope_1   |     resultFile = "",
mope_1   |     simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 10, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'BouncingBall', options = '', outputFormat = 'csv', variableFilter = '.*', cflags = '', simflags = ''",
mope_1   |     messages = "Simulation Failed. Model: BouncingBall does not exist! Please load it first before simulation.",
mope_1   |     timeFrontend = 0.0,
mope_1   |     timeBackend = 0.0,
mope_1   |     timeSimCode = 0.0,
mope_1   |     timeTemplates = 0.0,
mope_1   |     timeCompile = 0.0,
mope_1   |     timeSimulation = 0.0,
mope_1   |     timeTotal = 0.0
mope_1   | end SimulationResult;