.Modelica.Utilities.Streams.error

Information

Syntax

Streams.error(string);

Description

In case of an unrecoverable error (i.e., if the solver is unable to recover from the error), print the string "string" as error message and cancel all actions. This function is semantically equivalent with the built-in function assert if called with the (default) AssertionLevel.error. Line breaks are characterized by "\n" in the string.

Example

Streams.error("x (= " + String(x) + ")\nhas to be in the range 0 .. 1");

See also

Streams, Streams.print, ModelicaReference.Operators.'assert()' ModelicaReference.Operators.'String()'

Interface

pure function error
  extends Modelica.Icons.Function;
  input String string "String to be printed to error message window";
end error;

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos