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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:49:02+00:00 2026-05-13T10:49:02+00:00

Ok i have sinned, i wrote too much code like this try { //

  • 0

Ok i have sinned, i wrote too much code like this

try {
   // my code
} catch (Exception ex) {
   // doesn't matter
}

Now i’m going to cleanup/refactor this.

I’m using NB 6.7 and code completion works fine on first writing, adding all Exception types, etc. Once i have done the above code NB do not give more help.

Do you know a way to say NB look again for all Exception types and make the proposal for handling them and do code completion again ?

  • 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-13T10:49:03+00:00Added an answer on May 13, 2026 at 10:49 am

    When you ask for a proposal on how to handle the exceptions …

    There is no generally accepted way to handle them. Otherwise, you bet the java language would have implicitly that behavior.

    • Exceptions are not a low-level constraint that one must deal with until the compiler is smart-enough.
    • Exceptions are a high-level language construct, used to express the semantic “something exceptional happened, whose treatment you don’t want to mix with the regular code ; you prefer it to be handle in specific codes”.

    Exceptions exist in two forms, by design:

    • Checked Exceptions must be made explicit in each method that can throw them.
    • Unchecked Exceptions (subclasses of RuntimeException or Error) are usually implicit.

    At each level of code (method or block), the code has to choose what to do, in the event of any exception (except unchecked exceptions that can omit the treatment altogether). This is a choice of responsibility that varies, there is no decision valid for all cases :

    • PROCESS : Catch it and fully process it (calling codes typically don’t to know something happened). The current method need to have the responsibility. Logging the stack-trace for the developper might be useful.
    • STEP : Catch it, do a step of the processing that is related to the local code, and rethrow it (or rethrow another exception with the original one as a cause).
    • IGNORE : just let it to the responsibility of the calling code.

    The java language lets you have specific syntaxes making easier to handle exceptions, like the catch of specific exceptions followed more general ones…


    Typically, you consider Exceptions in your architecture, and make some design decisions. Some examples (mixed in unique ways):

    • choose to have one layer process all exceptions thrown in lower layers (ex : transactional services) : logging for the developper, positionning some global information for the user …
    • let some exceptions go up a few method calls until you arrive in a code where it is meaningful to process it (for example, depending on your exceptions, you can retry a full operation, or notify the user … )
    • etc.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 412k
  • Answers 412k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Like this: UIGraphicsBeginImageContext(myView.bounds.size); [myView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *myImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();… May 15, 2026 at 8:12 am
  • Editorial Team
    Editorial Team added an answer Yes there is... This is called as a memory pool.… May 15, 2026 at 8:12 am
  • Editorial Team
    Editorial Team added an answer I figured out that my problem was an issue with… May 15, 2026 at 8:12 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.