Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6024337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:08:25+00:00 2026-05-23T04:08:25+00:00

Maybe this is a little unconventional question but I’d like to hear an answer

  • 0

Maybe this is a little unconventional question but I’d like to hear an answer to it. Since english is not my native language I thought I’d ask for a second opinion.

I want to raise an Error in python and was wondering how to name 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 raise is the one which I was wondering, how to name it such that it is precise. I thought of

  1. NoUniqueResultFoundError
  2. AmbiguousResultError
  3. UncertainResultError

But they all don’t satisfy me, and I don’t know if I hit the nail with this nameing. It should be obvious to others, too. There has to be a specific expression for that. Which one is it. I thought of asking it on english.stackexchange.com, but I think a programmer has another sort of thinking then a philologist.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:08:26+00:00Added an answer on May 23, 2026 at 4:08 am

    I’d prefer AmbiguousStringError to AmbiguousResultError. After all, it’s not the result that has multiple meanings, it’s the string the user provided.

    Or possibly MultipleResultsFoundError. I think your suggestion of NoUniqueResultFoundError is as good as anything though. If you’re as thorough and thoughtful with the rest of your code as you are with this, other developers won’t have a problem debugging it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find this question a little tricky. Maybe someone knows an approach to answer
Maybe this is a dumb question, but do event listeners use CPU cycles like
maybe this question is a little silly, but is it possible to load multiple
maybe this is just a little misunderstanding but how can a programming language be
Maybe this question is a little far-fetched but i'll give it a shot.. Can
maybe this question is a little too general but maybe someone has experience the
maybe this question is a little basic, but I'm reading the official docs in
Maybe this is the dumbest question ever, but I'm having a little trouble getting
Maybe this sounds a little bit crazy, but I need to come up with
I realize something like this has been asked, but this may be a little

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.