:- multifile user:message_hook/3.
user:message_hook(+Severity, +MessageTerm, +Lines)
Overrides the call to
A way for the user to intercept the Message of type
Severity, whose translations is Lines, before it is
list of list of pair
Is of the form
[Line1, Line2, …], where each
Linei is of the form
After a message is parsed, but before the message is
If the call to
succeeds without further processing. Otherwise the built-in message
portrayal is used. It is often useful to have a message hook that
performs some action and then fails, allowing other message hooks to
run, and eventually allowing the message to be printed as usual.
An exception raised by this predicate causes an error message to be printed and then the original message is printed using the default message text and formatting.