Skip to content

Commit 71a9b80

Browse files
committed
#80 improve error message
1 parent 6268787 commit 71a9b80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/arangodb/springframework/transaction/ArangoTransaction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ void configure(TransactionDefinition definition) {
3838
String getOrBegin(Collection<String> collections) {
3939
if (transaction != null) {
4040
if (!writeCollections.containsAll(collections)) {
41-
throw new IllegalTransactionStateException("Stream transaction already started, no additional collections allowed");
41+
Set<String> additional = new HashSet<>(collections);
42+
additional.removeAll(writeCollections);
43+
throw new IllegalTransactionStateException("Stream transaction already started on collections " + writeCollections + ", no additional collections allowed: " + additional);
4244
}
4345
return transaction.getId();
4446
}

0 commit comments

Comments
 (0)