dcapwell commented on code in PR #4836:
URL: https://github.com/apache/cassandra/pull/4836#discussion_r3313579564
##########
test/unit/org/apache/cassandra/utils/CassandraGenerators.java:
##########
@@ -1759,8 +1760,22 @@ public static void visitUDTs(TableMetadata metadata,
Consumer<UserType> fn)
subTypes.remove(next); // it includes self
if (subTypes.isEmpty() || subTypes.stream().allMatch(t ->
visited.contains(t.name)))
{
- fn.accept(next);
+ try
+ {
+ fn.accept(next);
+ }
+ catch (Throwable t)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Unable to add type
").append(next.toCqlString(false, false, false));
Review Comment:
that is what happened. The JIRA has a error and the message is not helpful
```
Caused by: java.lang.IllegalStateException: Type
java.nio.HeapByteBuffer[pos=0 lim=1 cap=1] already exists
at org.apache.cassandra.schema.Types.with(Types.java:187)
```
So my thinking with this is that we can detect it if anything happens and
return a more useful error message
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]