The instanceof thing would work, but
a) getMessage is AFAIK a method of Exception too, so you can simply call it on e without any casting.
b) Have several catch blocks with diffferent classes. It's more efficient.
|
Results 1 to 7 of 7
Thread: instanceof ?Hybrid View
|
Click Here to Expand Forum to Full Width |