def throw_invalid_quad_params(quad, QUADS, nparams):
    """ Exception raised when an invalid number of params in the
        quad code has been emmitted.
    """
    raise InvalidICError(str(quad),
                         "Invalid quad code params for '%s' (expected %i, but got %i)" %
                         (quad, QUADS[quad][0], nparams)
                         )
Exception raised when an invalid number of params in the
        quad code has been emmitted.