Modified exceptions format in order to follow the Astropy style guide. Modified the print statement too.