|
@@ -48,6 +48,8 @@ public abstract class BKException extends Exception {
|
|
return new BKDigestNotInitializedException();
|
|
return new BKDigestNotInitializedException();
|
|
case Code.DigestMatchException:
|
|
case Code.DigestMatchException:
|
|
return new BKDigestMatchException();
|
|
return new BKDigestMatchException();
|
|
|
|
+ case Code.NoSuchLedgerExistsException:
|
|
|
|
+ return new BKNoSuchLedgerExistsException();
|
|
default:
|
|
default:
|
|
return new BKIllegalOpException();
|
|
return new BKIllegalOpException();
|
|
}
|
|
}
|
|
@@ -60,6 +62,7 @@ public abstract class BKException extends Exception {
|
|
int NoBookieAvailableException = -3;
|
|
int NoBookieAvailableException = -3;
|
|
int DigestNotInitializedException = -4;
|
|
int DigestNotInitializedException = -4;
|
|
int DigestMatchException = -5;
|
|
int DigestMatchException = -5;
|
|
|
|
+ int NoSuchLedgerExistsException = -6;
|
|
|
|
|
|
int IllegalOpException = -100;
|
|
int IllegalOpException = -100;
|
|
}
|
|
}
|
|
@@ -86,6 +89,8 @@ public abstract class BKException extends Exception {
|
|
return "Digest engine not initialized";
|
|
return "Digest engine not initialized";
|
|
case Code.DigestMatchException:
|
|
case Code.DigestMatchException:
|
|
return "Entry digest does not match";
|
|
return "Entry digest does not match";
|
|
|
|
+ case Code.NoSuchLedgerExistsException:
|
|
|
|
+ return "No such ledger exists";
|
|
default:
|
|
default:
|
|
return "Invalid operation";
|
|
return "Invalid operation";
|
|
}
|
|
}
|
|
@@ -126,5 +131,11 @@ public abstract class BKException extends Exception {
|
|
super(Code.IllegalOpException);
|
|
super(Code.IllegalOpException);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public static class BKNoSuchLedgerExistsException extends BKException {
|
|
|
|
+ public BKNoSuchLedgerExistsException(){
|
|
|
|
+ super(Code.NoSuchLedgerExistsException);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|