Replaces a too broad exception in a catch clause with more specific ones.