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 7726671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:16:25+00:00 2026-06-01T05:16:25+00:00

Does java has library exception class which means actually not an error, but good

  • 0

Does java has library exception class which means actually not an error, but good termination? I know I can make my own class or use null, but wish to know.

EDIT 1

I want to use exception object as an old fashion return code for a method, so I need something equivalent to ERROR_SUCCESS code in Win32 API.

  • 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-06-01T05:16:26+00:00Added an answer on June 1, 2026 at 5:16 am

    To directly answer your question: No. There is no standard Java exception that means “this is a normal termination”.

    If you wanted to, you could define a custom exception that meant this for your application.

    However,

    … using an exception for “normal control flow” goes against the strong recommendations of the Java designers, and a Java “Best Practice” rule that has pretty much universal acceptance. This is not to say you should NEVER do this. It is just that the cases where it is justifiable to do this are VERY RARE. (And you’d need to take special steps to avoid grossly inefficient code … )

    Anyway, the fact that it is (almost) always a terrible idea to use exceptions for normal flow control explains why a standard exception was never created. The Java designers clearly didn’t want to appear to be encouraging this practice.

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

Sidebar

Related Questions

Does anyone know a Library which provides a Thread.sleep() for Java which has an
Does anyone know of a scientific/mathematical library in Java that has a straightforward implementation
Does anyone know of a class in Java that has a list of elements,
Does such a thing exist anywhere? Basically I see java has LinkedHashSet but no
Does the BlackBerry Java SDK support 1.5 syntax? If not, has there been any
I am developing a library for Android applications which does not use native code
Does anyone know of a good .NET library that allows me to parse source
Not a very common implementation, but using Processing as a Java Servlet has been
Does anyone know of a java version of the python deferred library? Or maybe
I have a working implementation of NDK library and corresponding Java-class. But I am

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.