try {
parsedUpload = fileUpload.parseParameterMap(request);
return (Map<String, List<FileItem>>) parsedUpload;
} catch (FileUploadException e) {
if(e instanceof FileUploadBase.FileSizeLimitExceededException){
parsedUpload = new ErrException(e, Error.errFileMaxSize, "Allowed size is "+fileUpload.getFileSizeMax() / 1024 + " Kb");
}else
if(e instanceof FileUploadBase.InvalidContentTypeException){
parsedUpload = new ErrException(e, Error.errUploadMime);
}else
if(e instanceof FileUploadBase.IOFileUploadException){
parsedUpload = new ErrException(e, Error.errUploadTransfer);
}else{
parsedUpload = new ErrException(e, Error.errUploadCommon);
}
throw (ErrException) parsedUpload;
}
}