@Override
    public void write(final Kryo kryo, final Output output, final Throwable object) {
        kryo.writeObject(output, object.getClass());
        kryo.writeObject(output, StringUtils.defaultIfBlank(object.getMessage(), StringUtils.EMPTY));
    }
This is {@link ThrowableSerializer}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-memcached-core/src/main/java/org/apereo/cas/memcached/kryo/serial/ThrowableSerializer.java