This may be a little unconventional question, but I would like to hear the answer to it. Since English is not my native language, I thought I would ask for a second opinion.
I want to raise an error in python and wondered what to call it.
class AmbiguousResultError(Exception): pass
class NoResultFoundError(Exception): pass
def getUrlFor(mystring):
list_of_urls = []
if len(url) > 1:
raise AmbiguousResultError("More then one url matches for {0}".format(mystring))
elif not url:
raise NoResultFoundError("There was no matching url for {0}".format(mystring))
else:
return list_of_urls[0]
The first raiseis the one that interests me how to name it so that it is accurate. I'm thinking of
NoUniqueResultFoundErrorAmbiguousResultErrorUncertainResultError
But they all do not satisfy me, and I do not know if I hit with a nail with this name. This should be obvious to others. There must be a certain expression for this. Which one. I thought to ask about it on english.stackexchange.com, but I think the programmer has a different vision, and then a philologist.
source
share