Skip to content

Commit

Permalink
chore: improve log
Browse files Browse the repository at this point in the history
  • Loading branch information
SzyWilliam committed Jan 2, 2025
1 parent 320b207 commit eed13be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ <OUTPUT, THROWABLE extends Throwable> OUTPUT runSequentially(
// The current thread is already the runner.
return operation.get();
} else {
final Throwable cause = new Throwable("The thread already running: " + previous);
cause.setStackTrace(previous.getStackTrace());
throw new IllegalStateException(
name + ": Already running a method by " + previous + ", current=" + current);
name + ": Already running a method by " + previous + ", current=" + current, cause);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ void remove(TermIndex termIndex) {

@Override
public String toString() {
if (contexts.isEmpty()) {
return name + " <empty>";
}

final StringBuilder b = new StringBuilder(name);
contexts.forEach((k, v) -> b.append("\n ").append(k).append(": initialized? ").append(v.isInitialized()));
return b.toString();
return name + ":size=" + contexts.size();
}
}

0 comments on commit eed13be

Please sign in to comment.