Sending error and warning messages from Typol

Often, Typol tools would like to emit errors and warning messages during a computation. Centaur offers a generic message mechanism that allows you to use resources to specify messages and display them in a special message view.

A message module is a resource file that contains any number of message specifications. Each entry of this file specifies a message by symbolic name. Each message has text which may contain arguments. When the message is posted from a Typol rule, a value must be provided for each argument. These values may be trees, strings, integers, etc. The first posted message causes a special message display window to open. Each message is displayed with its severity (Error, Warning, Info, etc.) followed by the text in which the formel arguments have been replaced by supplied values. When you post a message, it is also possible to assign a position in the source tree to the message or any of its arguments. These positions are highlighted in the source by a special selection. When you click on the message or argument in the message display, the current selection in the source moves to the associated position.

The Typol users manual provides more examples of posting messages. The message handling manual in the Core describes a wide range of message possibilities.



Tutorial