Possible Duplicate:
In a Java 7 multicatch block what is the type of the caught exception?
What Exception type one must assume for the exception variable in Java's new multi-catch construct:
try{
//-- do error prone stuff
}
catch (ExceptionTypeA | ExceptionTypeB e) {
//-- e.methodA() or e.methodB() ?
}
If ExceptionTypeA
and ExceptionTypeB
are custom exceptions with custom utility methods, then, what type is e
when writing code ?, what methods can one call upon e
?