static final Throwable getThrowableCandidate(Object[] argArray) {
        if (argArray == null || argArray.length == 0) {
            return null;
        }

        final Object lastEntry = argArray[argArray.length - 1];
        if (lastEntry instanceof Throwable) {
            return (Throwable) lastEntry;
        }
        return null;
    }
Performs a two argument substitution for the 'messagePattern' passed as
parameter.
<p>
For example,

<pre>
MessageFormatter.format(&quot;Hi {}. My name is {}.&quot;, &quot;Alice&quot;, &quot;Bob&quot;);
</pre>

will return the string "Hi Alice. My name is Bob.".

@param messagePattern
         The message pattern which will be parsed and formatted
@param arg1
         The argument to be substituted in place of the first formatting
         anchor
@param arg2
         The argument to be substituted in place of the second formatting
         anchor
@return The formatted message
lts-core/src/main/java/com/github/ltsopensource/core/logger/support/MessageFormatter.java