I have the following code:
try {
//do some
} catch (NumberFormatException e) {
return DynamicFilterErrorCode.INVALID_VALUE;
} catch (ClassCastException e) {
return DynamicFilterErrorCode.INVALID_VALUE;
} catch (IllegaleArgumentException e) {
return DynamicFilterErrorCode.INVALID_VALUE;
}
Is it possible to combine those 3 catch clauses into one? They have exactly the same handler code, so I'd like to reuse it.