Catching the right exception.