Naming non-repeating result error in python?

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 = []
    # parse url object for all matching urls for the given string
    # and add them to 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

  • NoUniqueResultFoundError
  • AmbiguousResultError
  • UncertainResultError

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.

+3
source share
1

AmbiguousStringError AmbiguousResultError. , , , , .

, , MultipleResultsFoundError. , NoUniqueResultFoundError , . , , .

+3

All Articles