Changes type of error exception