LargeObjectException: Add constructor that takes Throwable
Change-Id: I500959286075f8ba4d0aa5820febd28c9c94ea1b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
06bab95e00
commit
c228f201a6
|
@ -64,6 +64,17 @@ public LargeObjectException() {
|
|||
// Do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a large object exception, where the object isn't known.
|
||||
*
|
||||
* @param cause
|
||||
* the cause
|
||||
* @since 4.10
|
||||
*/
|
||||
public LargeObjectException(Throwable cause) {
|
||||
initCause(cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a large object exception, naming the object that is too big.
|
||||
*
|
||||
|
|
|
@ -101,9 +101,7 @@ public byte[] getCachedBytes() throws LargeObjectException {
|
|||
try {
|
||||
throw new LargeObjectException(getObjectId());
|
||||
} catch (IOException cannotObtainId) {
|
||||
LargeObjectException err = new LargeObjectException();
|
||||
err.initCause(cannotObtainId);
|
||||
throw err;
|
||||
throw new LargeObjectException(cannotObtainId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue