All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.envimate.mapmate.CustomPrimitiveSerializationMethodCallException Maven / Gradle / Ivy

Go to download

MapMate is a modern mapping framework in the scope of mapping data in Json, XML, or YAML format into DTOs composed and vice versa.

There is a newer version: 1.6.8
Show newest version
/*
 * Copyright (C) 2017 [Richard Hauswald, Nune Isabekyan] (envimate GmbH - https://envimate.com/)
 */

package com.envimate.mapmate;

import java.lang.invoke.MethodHandle;

public final class CustomPrimitiveSerializationMethodCallException extends RuntimeException {
    private CustomPrimitiveSerializationMethodCallException(final String msg, final Throwable throwable) {
        super(msg, throwable);
    }

    public static CustomPrimitiveSerializationMethodCallException fromThrowable(
            final String description,
            final Throwable throwable,
            final Class type,
            final MethodHandle methodHandle,
            final Object instance) {
        final String msg = String.format("%s " +
                        "type: %s. " +
                        "method: %s. " +
                        "instance: %s.",
                description,
                type,
                methodHandle,
                instance);
        return new CustomPrimitiveSerializationMethodCallException(msg, throwable);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy