after raising a failure, return, don't try and write the blob

This commit is contained in:
kimchy 2010-07-21 23:45:15 +03:00
parent 2432a7cb5b
commit 4dcf219086
1 changed files with 2 additions and 1 deletions

View File

@ -53,8 +53,9 @@ public class ImmutableAppendableBlobContainer extends AbstractBlobContainer impl
String partBlobName = blobName + ".a" + (part++);
try {
listener.withStream(out);
} catch (IOException e) {
} catch (Exception e) {
listener.onFailure(e);
return;
}
FastByteArrayInputStream is = new FastByteArrayInputStream(out.unsafeByteArray(), 0, out.size());
container.writeBlob(partBlobName, is, out.size(), new ImmutableBlobContainer.WriterListener() {