Use raise method for error checkup.