added only the general Exception to catch error on method uploadFile
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@179245 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
48c7fdaa9c
commit
7863c45c90
|
@ -428,9 +428,7 @@ public final class WorkspaceStorageHubClientService implements Workspace{
|
|||
@Override
|
||||
public WorkspaceItem uploadFile(
|
||||
String folderId, InputStream is, String fileName, String fileDescription)
|
||||
throws InsufficientPrivilegesException,
|
||||
WorkspaceFolderNotFoundException, InternalErrorException,
|
||||
ItemAlreadyExistException, WrongDestinationException {
|
||||
throws Exception {
|
||||
|
||||
WorkspaceItem wsItem = null;
|
||||
try {
|
||||
|
@ -438,10 +436,8 @@ public final class WorkspaceStorageHubClientService implements Workspace{
|
|||
wsItem = HLMapper.toWorkspaceItem(item);
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("Error during uploading the file: "+fileName+" in the folderId: "+folderId, e);
|
||||
String error = e.getMessage()!=null?e.getMessage():"";
|
||||
throw new InternalErrorException("Error during uploading the file: "+fileName+". "+error);
|
||||
|
||||
LOGGER.error("Error uploading the file: "+fileName+" in the folderId: "+folderId, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
return wsItem;
|
||||
|
|
|
@ -149,14 +149,10 @@ public interface Workspace{
|
|||
* @param inputStream the input stream
|
||||
* @param fileName the file name
|
||||
* @param fileDescription the file description
|
||||
* @return the item
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @return the workspace item
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceItem uploadFile(String folderId, InputStream inputStream, String fileName, String fileDescription) throws InsufficientPrivilegesException, WorkspaceFolderNotFoundException, InternalErrorException, ItemAlreadyExistException, WrongDestinationException;
|
||||
public WorkspaceItem uploadFile(String folderId, InputStream inputStream, String fileName, String fileDescription) throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the shared folder members.
|
||||
|
@ -288,7 +284,7 @@ public interface Workspace{
|
|||
public URL getPublicLinkForFile(String fileItemId) throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the public link of the file at the input version
|
||||
* Gets the public link of the file at the input version.
|
||||
*
|
||||
* @param fileItemId the file item id
|
||||
* @param version the version
|
||||
|
|
Loading…
Reference in New Issue