throw error if quality is outside range of 1-10