private Throwable unwrapException(final Throwable e) {
        Throwable cause = e;

        while (cause != null && cause.getCause() != null && cause != cause.getCause()) {
            // Return cause early if it is a TransformerException or ProcessException
            if (cause instanceof TransformerException || cause instanceof ProcessException) {
                return cause;
            }

            cause = cause.getCause();
        }

        return cause;
    }
This is called when <pre>{@code <xsl:message>my message</xsl:message>}</pre>
is used in the XSLT.
It will log a message to the errorReceiver as ERROR.
If the {@code terminate} attribute is used like so:
<pre>{@code <xsl:message terminate="yes">my message</xsl:message>}</pre>
then it will log it as FATAL and throw an exception which will immediately terminate processing
of the current stream part. Subsequent parts will still be processed.
You can do this to set the severity (namespace of the inner element does not matter):
<pre>{@code <xsl:message><info>my message</info></xsl:message>}</pre>
Setting {@code terminate} trumps any severity set.
stroom-pipeline/src/main/java/stroom/pipeline/filter/XsltFilter.java