Skip to content

Commit

Permalink
Improved error handling if anything goes wrong during S3 upload, so t…
Browse files Browse the repository at this point in the history
…he root cause is reported
  • Loading branch information
d6y committed Jul 25, 2010
1 parent 0f68fc1 commit 1c4b2d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/hyperic/hudson/plugin/S3Profile.java
Expand Up @@ -109,12 +109,11 @@ public void upload(String bucketName,
}

try {
S3Object fileObject =
new S3Object(bucket, file.getName());
S3Object fileObject = new S3Object(bucket, file.getName());
fileObject.setDataInputStream(filePath.read());
this.s3.putObject(bucket, fileObject);
} catch (Exception e) {
throw new IOException("put " + file + ": " + e);
throw new IOException("put " + file + ": " + e, e);
}
}
}
Expand Down

0 comments on commit 1c4b2d7

Please sign in to comment.