On Mon, Jun 1, 2015 at 6:54 PM, Andy Zhou <az...@nicira.com> wrote:
[...]
>> -    return xasprintf("%s: bad syntax for %s", s, mf->name);
>> +    if (err == ERANGE) {
>> +        return xasprintf("%s: value too large for %u-byte field %s",
>> +                         s, mf->n_bytes, mf->name);
> This error message can be more helpful:  When it shows up, it is not
> clear it is value or mask part caused the error. When it is integer
> output range,
> the message talked about number of bytes that can be confusing.
>
> On the other hand, giving extra information may be overkill here, and
> it is close
> to what current code does. So it would be nice to improve, but not a must.

I agree it is nice to specify whether the problem is in the value or
the mask so I added that to the error message. I'm less sure about how
to improve the reporting of limits in an integer string and I guess it
doesn't seem too confusing to me as it is so I left that alone for
now.

I pushed this to master with that change made.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to