[bind10-dev] A plea for Name() rather than Name(".")

Michael Graff mgraff at isc.org
Tue Feb 16 13:07:02 UTC 2010


On 2/16/10 6:36 AM, Shane Kerr wrote:

> The problem with this is that anyone writing a function then has to be
> prepared for exceptions in places that they did not have to be before.

I consider this argument to be a bogus one.  There are a myriad of
reasons you can get an exception from Name() which do not include ones
we check for explicitly.  For instance, lack of memory.  We do not
currently check for each of these.

If we get an exception and did not expect it, I would think it would
trickle up to the "ultimate caller" and let them deal with it.  For
instance, if we got an unexpected exception while processing a query,
what would we do?  We would drop the query on the floor.  I see no
reason why adding another exception possibility to this undefined list
of possible exceptions is going to cause problems.

BTW, this is exactly what I would say it should do -- throw an
exception.  I think this is far safer and better to do than have a dummy
value used instead.  For one, it tracks the issue down quite nicely.

--Michael



More information about the bind10-dev mailing list