variable exception in java | Web Hosting Talk

Why do you need a variable in the trap exception and how does it use each one in the same way as the detailed exception?

TemperatureException and e
TooColdException and e

for example:
Code:
try {
cust.drinkCoffee (cup);
System.out.println ("Coffee is fair.");
}
capture (TemperatureException e) {
// This traps the exception TooColdException, TooHotException,
// as well as TemperatureException.
System.out.println ("The coffee is too cold or too hot.");
// Deal with an irate customer …
}
// THIS WILL NOT BE COMPILED, BECAUSE THIS CAPTION clause
// IT WILL NEVER COME.
catch (TooColdException e) {
System.out.println ("The coffee is very cold.");
}