List of usage examples for java.net UnknownServiceException initCause
public synchronized Throwable initCause(Throwable cause)
From source file:org.apache.shindig.protocol.multipart.DefaultMultipartFormParser.java
public Collection<FormDataItem> parse(HttpServletRequest servletRequest) throws IOException { FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); try {/*from ww w. j a va 2s . c o m*/ @SuppressWarnings("unchecked") List<FileItem> fileItems = upload.parseRequest(servletRequest); return convertToFormData(fileItems); } catch (FileUploadException e) { UnknownServiceException use = new UnknownServiceException("File upload error."); use.initCause(e); throw use; } }