Skip to content

Commit

Permalink
Minor tweaks #3921
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Jul 31, 2017
1 parent 08812d8 commit 3978029
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package edu.harvard.iq.dataverse.dataaccess;

import com.amazonaws.AmazonClientException;
import com.amazonaws.SdkClientException;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
Expand Down Expand Up @@ -168,7 +169,7 @@ public void savePath(Path fileSystemPath) throws IOException {

newFileSize = inputFile.length();

} catch (Exception ioex) {
} catch (SdkClientException ioex) {
String failureMsg = ioex.getMessage();
if (failureMsg == null) {
failureMsg = "Swift AccessIO: Unknown exception occured while uploading a local file into a Swift StoredObject";
Expand Down Expand Up @@ -309,8 +310,7 @@ AmazonS3 authenticateWithS3(String swiftEndPoint) throws IOException {
new AWSStaticCredentialsProvider(credentials)).withRegion(Regions.US_EAST_1).build();

} catch (Exception ex) {
ex.printStackTrace();
throw new IOException("S3AccessIO: failed to authenticate S3");
throw new IOException("S3AccessIO: failed to authenticate S3" + ex.getMessage());
}

return s3;
Expand Down

0 comments on commit 3978029

Please sign in to comment.