Change method of throwing error.