Errors, Warnings and Informational Messages

If your program calls a built-in predicate with arguments that are not appropriate for that predicate, the system will display an error message. For example, if your program called the goal

     | ?- atom_chars(X,a).

you would get an error message like this

     ! Type error in argument 2 of atom_chars/2
     ! list expected, but a found
     ! goal:  atom_chars(_2016,a)

since atom_chars/2 expects a list of characters (or a variable) as its second argument. The ! prefix to each line signifies that this is an error. The other prefixes that are used are * for warnings and % for informational messages.

When an error occurs, your program is abandoned and you are returned to the top level. There is an exception handling mechanism, which can be used to prevent this in specified parts of your program. See ref-ere-hex for more information.

A warning is less serious than an error; it indicates that something might be wrong. It may save you debugging time later to check it right away.

Informational messages are just messages to let you know what the system is doing.

All these messages can be customized if you wish. See ref-msg for how to do this.