﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3074	Multiple problems with assert statements	Francesco Casella	somebody	"Please consider the attached test package, which demonstrates a number of problems regarding the handling of asserts in OMC.

If you simulate TestErrorVariable2, you get the following error message:
  Variable x is too big

Unfortunately, the message doesn't tell you an essential piece of information, i.e., ''where'' in the model has this error been triggered. Is it m1, m2 or m3?

One option is to enhance the error message like this:
  The following assertion has been violated: m2.x < 10
  Error message: Variable x is too big

Incidentally, I think the ""Process crashed"" final message is inappropriate. It seem to hint to the fact that some uncontrolled error has taken place, such as a memory access violation in some external function, which is definitely not the case here. I would suggest to use ""Process aborted"", which seems more appropriate.


TestWarningConstant is terminated by an assertion violation at initialization. However, this assertion has AssertionLevel.warning, so according to the Modelica Spec. 8.3.7, a warning should be issued, then the simulation should continue.

TestWarningVariable is terminated when the warning assert is violated. According to the spec, a warning message should be issued once, then the simulation should continue.

TestErrorConstant is handled correctly, besides the above-mentioned lack of information, which is common to all cases.

TestErrorVariable is terminated when the warning assert is violated. According to the spec, a warning message should be issued once, then the simulation should continue until the error assert is violated, then aborted.

Last, but not least, I would suggest to add these test cases to the Modelica Language Compliance Test library, as other tools seem to have the same kind of problems."	defect	new	high	Future	Unknown	trunk			
