Add more handling to the exceptions.