Change exception type
Change exception type

Co-Authored-By: astrofrog <5a30e73bb3eb7866ce4ccff234d7add82054e98d@gmail.com>
mhvk/astropy,bsipocz/astropy,stargaser/astropy,astropy/astropy,MSeifert04/astropy,mhvk/astropy,larrybradley/astropy,pllim/astropy,larrybradley/astropy,stargaser/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,pllim/astropy,larrybradley/astropy,astropy/astropy,saimn/astropy,saimn/astropy,dhomeier/astropy,StuartLittlefair/astropy,dhomeier/astropy,StuartLittlefair/astropy,MSeifert04/astropy,lpsinger/astropy,lpsinger/astropy,astropy/astropy,dhomeier/astropy,dhomeier/astropy,lpsinger/astropy,astropy/astropy,pllim/astropy,astropy/astropy,mhvk/astropy,saimn/astropy,bsipocz/astropy,lpsinger/astropy,bsipocz/astropy,aleksandr-bakanov/astropy,larrybradley/astropy,MSeifert04/astropy,bsipocz/astropy,dhomeier/astropy,aleksandr-bakanov/astropy,pllim/astropy,StuartLittlefair/astropy,larrybradley/astropy,stargaser/astropy,StuartLittlefair/astropy,aleksandr-bakanov/astropy,saimn/astropy,stargaser/astropy,MSeifert04/astropy,mhvk/astropy,pllim/astropy,lpsinger/astropy,mhvk/astropy,saimn/astropy