Search in sources :

Example 1 with ErrorMessage

use of org.modelmapper.spi.ErrorMessage in project microservices by pwillhan.

the class ModelMapConfigurationFailureAnalyzer method analyze.

@Override
protected FailureAnalysis analyze(Throwable rootFailure, ConfigurationException cause) {
    StringBuilder description = new StringBuilder();
    description.append("ModelMapper configuration failed:\n");
    for (ErrorMessage message : cause.getErrorMessages()) {
        description.append(message.getMessage());
    }
    return new FailureAnalysis(description.toString(), "Fix ModelMapper configuration", cause);
}
Also used : FailureAnalysis(org.springframework.boot.diagnostics.FailureAnalysis) ErrorMessage(org.modelmapper.spi.ErrorMessage)

Aggregations

ErrorMessage (org.modelmapper.spi.ErrorMessage)1 FailureAnalysis (org.springframework.boot.diagnostics.FailureAnalysis)1