Final version for exception exercise