slinkydeveloper commented on a change in pull request #17658:
URL: https://github.com/apache/flink/pull/17658#discussion_r742034054
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/rules/AbstractCodeGeneratorCastRule.java
##########
@@ -148,9 +147,10 @@ protected AbstractCodeGeneratorCastRule(CastRulePredicate
predicate) {
classCode)
.getConstructors()[0]
.newInstance(constructorArgs);
- } catch (InstantiationException | IllegalAccessException |
InvocationTargetException e) {
+ } catch (Throwable e) {
Review comment:
IIRC I converted to `Throwable` to catch also `Error`s and not just
`Exception`. I can revert if you want, but I think it's better to keep it this
way because invoking this constructor should never fail, for any reason, and we
need to catch it immediately if it fails in order to wrap it with the code
associated.
--
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]