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

  • SEARCH
  • Home
  • 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 6700005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:45:47+00:00 2026-05-26T06:45:47+00:00

I have your standard try/catch statement: try { // Do a bunch of stuff

  • 0

I have your standard try/catch statement:

try
{
  // Do a bunch of stuff
}
catch ( Exception e )
{
  throw e;
}

Is there any way to determine what possible Exceptions could be caught from my code without trying to force my code to fail in order to see what type of Exception e is?

For example, if I did some HTTP calls or maybe some JSON stuff that I want to handle differently, my code might look like this:

try
{
  // Do a bunch of stuff
}
catch ( HttpException e )
{
  // Do something
  throw e;
}
catch ( JSONException e )
{
  // Do something else
  throw e;
}
catch ( Exception e )
{
  throw e;
}

But maybe I’m doing a whole bunch of stuff in my code and I’m not sure (due to lack of Java experience) what the possible Exceptions are that could be caught…

Is there any possible way to use Eclipse to look at a set of code and get a list of every possible type of exception that could be caught?

  • 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-26T06:45:48+00:00Added an answer on May 26, 2026 at 6:45 am

    Well there’s two types of exceptions: checked and unchecked.

    You can’t get a list of all unchecked exceptions, because they might not tell you what they are. (They might, if you read the documentation for the libraries you’re using.)

    For checked exceptions, you wouldn’t be able to compile the code if you weren’t catching them all. I would simply remove the Exception e block and compile with it. Honestly catching every exception is a bad idea unless you’re truly prepared to handle it.

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

Sidebar

Related Questions

Is there a (or, do you have your own) preferred way to do background
So the way i've been told to do things is you have your file
Say you're building a Tetris game. As any proper programmer, you have your view
Once you have uploaded your source code to Heroku, is it possible to download
I have approached you today to try and gather your opinions and experience with
I have your run of the mill nested set hierarchy type setup with the
Is it dangerous to have your admin interface in a Django app accessible by
Once you have your first set of requirements and design done where do you
What needs to be done to have your .NET application show up in Window's
I just wanted to see if I could have your thoughts on the design

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.