replace Error in Sprite with proper exceptions