refactored control structure error throwing with a 'throws' infix function; much cleaner