Example usage for org.springframework.core NestedRuntimeException NestedRuntimeException

List of usage examples for org.springframework.core NestedRuntimeException NestedRuntimeException

Introduction

In this page you can find the example usage for org.springframework.core NestedRuntimeException NestedRuntimeException.

Prototype

public NestedRuntimeException(@Nullable String msg, @Nullable Throwable cause) 

Source Link

Document

Construct a NestedRuntimeException with the specified detail message and nested exception.

Usage

From source file:org.slc.sli.ingestion.handler.EntityPersistHandler.java

boolean update(String collectionName, Entity entity, List<Entity> failed, AbstractMessageReport report,
        ReportStats reportStats, Source nrSource) {
    boolean res = false;

    try {/*  w w w.j a v  a  2s .com*/
        res = entityRepository.updateWithRetries(collectionName, entity, totalRetries);
        if (!res) {
            failed.add(entity);
        }
    } catch (MongoException e) {
        NestedRuntimeException wrapper = new NestedRuntimeException("Mongo Exception", e) {
            private static final long serialVersionUID = 1L;
        };
        reportWarnings(wrapper.getMostSpecificCause().getMessage(), collectionName,
                ((SimpleEntity) entity).getSourceFile(), report, reportStats, nrSource);
    }

    return res;
}