@Override
    public Throwable read(final Kryo kryo, final Input input, final Class<? extends Throwable> aClass) {
        try {
            val clazz = kryo.readObject(input, Class.class);
            val msg = kryo.readObject(input, String.class);
            return (Throwable) clazz.getDeclaredConstructor(String.class).newInstance(msg);
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        return new Throwable();
    }
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