Throw an error when exporting a resource class
Throw an error when exporting a resource class

"export var tex = Texture"
will now throw an error to avoid crashing the editor:
"Exported constant not a type or resource"

Fixes #6719 . Closes #6729

n-pigeon/godot,Paulloz/godot,RandomShaper/godot,exabon/godot,sanikoyes/godot,morrow1nd/godot,morrow1nd/godot,mcanders/godot,sanikoyes/godot,firefly2442/godot,NateWardawg/godot,DmitriySalnikov/godot,MarianoGnu/godot,Shockblast/godot,ex/godot,Valentactive/godot,Marqin/godot,vnen/godot,okamstudio/godot,NateWardawg/godot,RebelliousX/Go_Dot,NateWardawg/godot,BastiaanOlij/godot,DmitriySalnikov/godot,Shockblast/godot,honix/godot,Brickcaster/godot,guilhermefelipecgs/godot,josempans/godot,ex/godot,RandomShaper/godot,okamstudio/godot,n-pigeon/godot,Shockblast/godot,exabon/godot,zicklag/godot,DmitriySalnikov/godot,akien-mga/godot,pkowal1982/godot,MarianoGnu/godot,NateWardawg/godot,Zylann/godot,ZuBsPaCe/godot,Faless/godot,mcanders/godot,MarianoGnu/godot,Shockblast/godot,Faless/godot,n-pigeon/godot,RebelliousX/Go_Dot,godotengine/godot,Faless/godot,firefly2442/godot,FateAce/godot,MrMaidx/godot,NateWardawg/godot,akien-mga/godot,tomreyn/godot,josempans/godot,Faless/godot,jejung/godot,DmitriySalnikov/godot,Max-Might/godot,FateAce/godot,ZuBsPaCe/godot,n-pigeon/godot,Valentactive/godot,vnen/godot,vkbsb/godot,vnen/godot,vkbsb/godot,akien-mga/godot,Faless/godot,godotengine/godot,morrow1nd/godot,akien-mga/godot,zicklag/godot,okamstudio/godot,MrMaidx/godot,exabon/godot,Paulloz/godot,jejung/godot,tomreyn/godot,RandomShaper/godot,ageazrael/godot,pkowal1982/godot,sanikoyes/godot,DmitriySalnikov/godot,mcanders/godot,tomreyn/godot,Max-Might/godot,Shockblast/godot,n-pigeon/godot,MrMaidx/godot,akien-mga/godot,akien-mga/godot,exabon/godot,tomreyn/godot,RebelliousX/Go_Dot,firefly2442/godot,Brickcaster/godot,RandomShaper/godot,okamstudio/godot,RebelliousX/Go_Dot,josempans/godot,okamstudio/godot,ficoos/godot,ageazrael/godot,FateAce/godot,Valentactive/godot,Zylann/godot,MrMaidx/godot,Zylann/godot,RandomShaper/godot,exabon/godot,RandomShaper/godot,godotengine/godot,godotengine/godot,firefly2442/godot,honix/godot,mcanders/godot,pkowal1982/godot,jejung/godot,Valentactive/godot,Zylann/godot,Faless/godot,Shockblast/godot,guilhermefelipecgs/godot,vkbsb/godot,Max-Might/godot,Marqin/godot,Valentactive/godot,Paulloz/godot,Faless/godot,Brickcaster/godot,Zylann/godot,okamstudio/godot,NateWardawg/godot,zicklag/godot,BastiaanOlij/godot,Valentactive/godot,pkowal1982/godot,DmitriySalnikov/godot,BastiaanOlij/godot,zicklag/godot,zicklag/godot,godotengine/godot,pkowal1982/godot,zicklag/godot,groud/godot,ex/godot,MrMaidx/godot,firefly2442/godot,akien-mga/godot,Marqin/godot,josempans/godot,Zylann/godot,groud/godot,tomreyn/godot,firefly2442/godot,pkowal1982/godot,ageazrael/godot,mcanders/godot,Valentactive/godot,FateAce/godot,vnen/godot,FateAce/godot,FateAce/godot,Marqin/godot,sanikoyes/godot,ex/godot,NateWardawg/godot,NateWardawg/godot,ageazrael/godot,firefly2442/godot,groud/godot,morrow1nd/godot,vkbsb/godot,Paulloz/godot,guilhermefelipecgs/godot,josempans/godot,Brickcaster/godot,MarianoGnu/godot,RebelliousX/Go_Dot,BastiaanOlij/godot,morrow1nd/godot,Max-Might/godot,MarianoGnu/godot,Paulloz/godot,n-pigeon/godot,ZuBsPaCe/godot,ZuBsPaCe/godot,Shockblast/godot,guilhermefelipecgs/godot,Brickcaster/godot,NateWardawg/godot,RandomShaper/godot,ZuBsPaCe/godot,Marqin/godot,ficoos/godot,Max-Might/godot,okamstudio/godot,MarianoGnu/godot,vkbsb/godot,ZuBsPaCe/godot,ZuBsPaCe/godot,vnen/godot,Brickcaster/godot,sanikoyes/godot,Valentactive/godot,josempans/godot,ficoos/godot,vkbsb/godot,jejung/godot,vkbsb/godot,pkowal1982/godot,okamstudio/godot,guilhermefelipecgs/godot,pkowal1982/godot,akien-mga/godot,honix/godot,guilhermefelipecgs/godot,honix/godot,godotengine/godot,sanikoyes/godot,Zylann/godot,vnen/godot,vnen/godot,godotengine/godot,Faless/godot,ageazrael/godot,sanikoyes/godot,morrow1nd/godot,guilhermefelipecgs/godot,ZuBsPaCe/godot,honix/godot,firefly2442/godot,groud/godot,groud/godot,ex/godot,Paulloz/godot,ex/godot,Paulloz/godot,MrMaidx/godot,BastiaanOlij/godot,ficoos/godot,mcanders/godot,RebelliousX/Go_Dot,vkbsb/godot,Max-Might/godot,exabon/godot,jejung/godot,n-pigeon/godot,BastiaanOlij/godot,Zylann/godot,ficoos/godot,Shockblast/godot,okamstudio/godot,Marqin/godot,MarianoGnu/godot,DmitriySalnikov/godot,josempans/godot,guilhermefelipecgs/godot,Brickcaster/godot,groud/godot,vnen/godot,jejung/godot,honix/godot,ficoos/godot,okamstudio/godot,ex/godot,BastiaanOlij/godot,josempans/godot,ageazrael/godot,MarianoGnu/godot,BastiaanOlij/godot,ageazrael/godot,ex/godot,godotengine/godot,sanikoyes/godot