Prolog responds to many situations by displaying messages. These messages fall into five categories: error, warning, informational, help and silent. Here are examples of a messages of each category printed without customization:

Error message: (1)

     | ?- X is apples + oranges.
     ! Type error in argument 2 of is/2
     ! number expected, but apples found
     ! goal:  _2277 is apples+oranges

Informational message: (2)

     | ?- debug.
     % The debugger will first leap -- showing spypoints (debug)

Warning message: (3)

     | ?- spy g.
     * There are no predicates with the name g in module user

Help messages (response to a user's request for information): (4)

     | ?- version.
     Quintus Prolog Release 3.5 (Sun 4, SunOS 5.5)

Silent messages (nothing is printed for these message, but the users can define a message hook to catch these messages): (5)

     There is a ``silent'' message every time a top level goal is executed.

Note that each type of message has a characteristic prefix:


The display of messages such as these can be customized in various ways, including translation into other languages to facilitate internationalization of applications, adding new types of messages, most notably exception messages, changing the text or appearance of the messages as displayed.

Furthermore it is possible to extend the programming environment by specifying goals to be called when specified events occur. These goals would override the straightforward display of message text. A major type of application here is graphical user interfaces.

Finally, you can control how the system asks for and interprets responses from users.