[an error occurred while processing this directive]
$MessagePrePrint is a global variable whose value, if set, is applied to expressions before they are included in the text of messages.
The default value of $MessagePrePrint is Short.
$MessagePrePrint is applied after each expression is wrapped with HoldForm.
See the Mathematica book: Section 2.8.21, Section 2.13.1.
See also: $PrePrint.