Avatar of bond7
bond7
 asked on

Java development throw exception in exception handler

Hello,

Is it better to use multiple excepton handlers with throw options or handle exceptions without throw excpetion.Should one use throw exception at all ?

Best
bond77
Editors IDEsWeb DevelopmentJavaProgramming TheoryProgramming

Avatar of undefined
Last Comment
jzkidding

8/22/2022 - Mon
SOLUTION
HackneyCab

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
a_b

Have a look the article below; that should answer your question.

http://onjava.com/pub/a/onjava/2003/11/19/exceptions.html
bond7

ASKER
Hello,

Thanks for response.
I will elaborate on the question.
In a java program, I have a main method and another method say A.
I have a exception catcher at the method {Non main} and another excpetion catcher at main.
So i have two exception catchers.
I am wondering if I should throw exception at A , because it will be caught again by main method.
or I should just handle it at exception catcher at A.
ASKER CERTIFIED SOLUTION
a_b

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
jzkidding

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck