Reputation: 41769
Let's say I need to add some Exception
subclasses into catch
, such as these ones
...//
catch (ConnectTimeoutException e) {
e.printStackTrace();
} catch (HttpHostConnectException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
The first two are (obviously) subclasses of IOException
.
How can I add such subclasses into catch
in a better (quicker, easier) way than copy/pasting then?
I am confident that IDEA has such automatic feature, but I am not sure which one it is or how to use it.
Upvotes: 3
Views: 131