Message Generation Phase

The default message generation predicates are located in the library('SU_messages') file, in the 'SU_messages' module, together with other message and query related predicates. This is advantageous when these predicates have to be changed as a whole (for example when translating all messages to another language), because this can be done simply by replacing the file library('SU_messages') by a new one.

In the message generation phase three alternative methods are tried:

The hook predicate generate_message_hook/3 can be used to override the default behavior, or to handle new messages defined by the programmer, which do not fit the default message generation schemes. The latter can also be achieved by adding new clauses to the extendible 'SU_messages':generate_message/3 predicate.

If both the hook and the default method refuses to handle the message, then the following simple format-command list is generated from the abstract message term Message:

     ['~q'-[Message],nl]
     
This will result in displaying the abstract message term itself, as if printed by writeq/1.

For messages of the severity silent the message generation phase is skipped, and the [] format-command list is returned as the output.