CS202 5- ‹#›
Catching an Exception
nWhen an exception is thrown, we can associate an operand of some type with the throw operator.
nThe type of the operand determines the type of the exception.
nControl is passed to a block of code (the catch block) corresponding to that type.
nThe value of the operand (the exception) associated with throw is passed to the catch block (the exception handler) as a temporary.
nthrow i;  //under some condition throw an exception
n          //with an integer argument
n
ncatch(int x) { //catch integer exceptions
n  ...
n}
n