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

org.simpleflatmapper.map.error.RethrowFieldMapperErrorHandler Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.map.error;

import org.simpleflatmapper.converter.Context;
import org.simpleflatmapper.map.FieldMapperErrorHandler;
import org.simpleflatmapper.map.MappingContext;
import org.simpleflatmapper.map.MappingException;
import org.simpleflatmapper.util.ErrorHelper;

public final class RethrowFieldMapperErrorHandler implements FieldMapperErrorHandler {

	public static RethrowFieldMapperErrorHandler INSTANCE = new RethrowFieldMapperErrorHandler();

	private RethrowFieldMapperErrorHandler() {
	}

	@Override
	public void errorMappingField(final Object name, final Object source, final Object target,
								  final Exception error, Context mappingContext) throws MappingException {
        ErrorHelper.rethrow(error);
	}

}