added exception

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@173563 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-10-17 10:50:41 +00:00
parent 48ee0a7211
commit cd13b3973a
1 changed files with 5 additions and 0 deletions

View File

@ -458,6 +458,11 @@ public class WorkspaceUploadServletStream extends HttpServlet implements Servlet
saveWorkspaceUploaderStatus(workspaceUploader, UPLOAD_STATUS.FAILED, "An error occurred during upload: "+fileName+". No destination folder found", request.getSession()); saveWorkspaceUploaderStatus(workspaceUploader, UPLOAD_STATUS.FAILED, "An error occurred during upload: "+fileName+". No destination folder found", request.getSession());
sendError(response, "Internal error: No destination folder found"); sendError(response, "Internal error: No destination folder found");
return; return;
} catch (Exception e) {
logger.error("Error, no destination folder found", e);
saveWorkspaceUploaderStatus(workspaceUploader, UPLOAD_STATUS.FAILED, "An error occurred during upload: "+fileName, request.getSession());
sendError(response, "Internal error: No destination folder found");
return;
} }
if (item.getType() != WorkspaceItemType.FOLDER && item.getType() != WorkspaceItemType.SHARED_FOLDER) { if (item.getType() != WorkspaceItemType.FOLDER && item.getType() != WorkspaceItemType.SHARED_FOLDER) {