Fixed typo in the error generation

Fixed the double raise term in the code