When error mode "error" is used the expander places
errors directly into the output. The format of that
error message is hardwired. And really suitable only if
the output is plain text.
IMHO it makes sense to have a callback which can be set
and creates a message which is properly formatted for
the generated document. For example in HTML a box with
highlighted background, bold text, large font, colors, ...