dcapwell commented on code in PR #4836:
URL: https://github.com/apache/cassandra/pull/4836#discussion_r3313606046
##########
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:
spoke in slack, the `BaseState` comment makes sense now.
`BaseState` in the ast tests has 2 code paths: `createTable` which does a
schema change, and `toString` which shows the toString. The toString shouldn't
ever throw, but the `createTable` case can; so that case will get a more useful
error message next time
--
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]