Skip to content

Commit

Permalink
Include term in exception message.
Browse files Browse the repository at this point in the history
  • Loading branch information
broneill committed Oct 20, 2024
1 parent 5223616 commit f73c3fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/cojen/tupl/repl/FileTermLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ public void finishTerm(long endPosition) {
if (endPosition < commitPosition && commitPosition > mLogStartPosition) {
throw new IllegalStateException
("Cannot finish term below commit position: " + endPosition
+ " < " + commitPosition);
+ " < " + commitPosition + "; term: " + mLogTerm);
}

if (endPosition == mLogEndPosition) {
Expand Down Expand Up @@ -1102,7 +1102,8 @@ Segment segmentForReading(long position) throws IOException {

if (position < commitPosition) {
throw new InvalidReadException
("Position is too low: " + position + " < " + commitPosition);
("Position is too low: " + position + " < " + commitPosition +
"; term: " + mLogTerm);
}
} finally {
releaseExclusive();
Expand Down

0 comments on commit f73c3fb

Please sign in to comment.