try {
data = block.decode(context.getBucketFactory(parent.persistent()), (int)(Math.min(ctx.maxOutputLength, Integer.MAX_VALUE)), false);
} catch (KeyDecodeException e1) {
if(logMINOR)
Logger.minor(this, "Decode failure: "+e1, e1);
onFailure(new FetchException(FetchExceptionMode.BLOCK_DECODE_ERROR, e1.getMessage()), false, context);
return null;
} catch (TooBigException e) {
onFailure(new FetchException(FetchExceptionMode.TOO_BIG, e), false, context);
return null;
} catch (InsufficientDiskSpaceException e) {
onFailure(new FetchException(FetchExceptionMode.NOT_ENOUGH_DISK_SPACE), false, context);
return null;
} catch (IOException e) {
Logger.error(this, "Could not capture data - disk full?: "+e, e);
onFailure(new FetchException(FetchExceptionMode.BUCKET_ERROR, e), false, context);
return null;
}
return data;
}