Example usage for org.springframework.web.multipart MultipartException getMessage

List of usage examples for org.springframework.web.multipart MultipartException getMessage

Introduction

In this page you can find the example usage for org.springframework.web.multipart MultipartException getMessage.

Prototype

@Override
@Nullable
public String getMessage() 

Source Link

Document

Return the detail message, including the message from the nested exception if there is one.

Usage

From source file:org.codehaus.groovy.grails.web.multipart.ContentLengthAwareCommonsMultipartResolver.java

@SuppressWarnings("deprecation")
@Override//w ww.j  a  v a  2 s  .  c  o m
protected MultipartParsingResult parseRequest(HttpServletRequest request) throws MultipartException {
    try {
        return super.parseRequest(request);
    } catch (MultipartException e) {
        if (e.getCause() != null && e.getCause().getClass().equals(FileUploadBase.UnknownSizeException.class)) {
            LOG.warn(e.getMessage());
            Map<String, String[]> emptyMpParams = Collections.emptyMap();
            Map<String, String> emptyMpParamContentTypes = Collections.emptyMap();
            return new MultipartParsingResult(EMPTY_MULTI_VALUE_MAP, emptyMpParams, emptyMpParamContentTypes);
        }
        throw e;
    }
}