public static void throwMappingException(Throwable e) throws MappingException {
        if (e instanceof MappingException) {
            // in this case we do not want to re-wrap an existing mapping exception
            throw (MappingException)e;
        } else if (e instanceof RuntimeException) {
            // feature request 1561837. Dont wrap any runtime exceptions in a MappingException
            throw (RuntimeException)e;
        } else {
            throw new MappingException(e);
        }
    }
Internal class that provides various mapping utilities used throughout the code base. Only intended for internal use.
core/src/main/java/com/github/dozermapper/core/util/MappingUtils.java