Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.6
-
None
-
Windows 10
Description
try { throw new AnyJavaException() } catch ( AnyJavaException1 | AnyJavaException2 e ) { println e.message }
This works as expected. But following does not:
try { throw new AnyJavaException() } catch ( AnyJavaException | AnyGroovyException e ) { println e.message }
You get:
java.lang.ClassCastException: AnyJavaException cannot be cast to groovy.lang.GroovyObject