Wednesday, February 15, 2012

Introducing exception handling

In programming terms, an exception is an event that stops the normal execution of a program.

For example, a program might try to access an element outside the bounds of an array, or some file input and output operation might fail.

You need to ensure that your Java programs can deal with exceptions without simply crashing.
When an exception occurs at run time, the method in which it occurs creates an exception object. Execution is aborted unless the exception is handled somewhere along the call stack.

The method can throw the exception back to the calling method, which may be better able to handle it. The exception object includes information about the exception, such as the method in which it occurred and the cause of the exception.
The calling method can, in turn, throw the exception back to its caller. It's up to the developer to provide exception-handling code within the appropriate methods.
If no method handles the exception, the program terminates when the exception object reaches the top of the visible call stack - the main method.
When an exception occurs, you can prevent it being passed up the call stack – and potentially terminating the application – by providing handling code for the particular exception type, enabling the application to continue execution along a different path.

You can direct an application to use an exception handler in the method in which the exception occurs, or in one of that method's calling methods.
Once the exception is handled, the program continues to run, although this depends on the specific implementation.

46 comments:

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
Data Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
Data science training in Bangalore
Data science training in tambaram

Wonderful article, very useful and well explanation. Your post is extremely incredible. I will refer this to my candidates...
Devops training in Chennai
Devops training in Bangalore
Devops Online training
Devops training in Pune

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
java training in chennai | java training in bangalore

java online training | java training in pune

selenium training in chennai

selenium training in bangalore

A universal message I suppose, not giving up is the formula for success I think. Some things take longer than others to accomplish, so people must understand that they should have their eyes on the goal, and that should keep them motivated to see it out til the end.
java training in annanagar | java training in chennai

java training in marathahalli | java training in btm layout

java training in rajaji nagar | java training in jayanagar

java training in chennai

This comment has been removed by the author.
This comment has been removed by the author.
This comment has been removed by the author.

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
python training in OMR
python training in tambaram
python training in annanagar

When I initially commented, I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove people from that service? Thanks.
Amazon Web Services Training in OMR , Chennai | Best AWS Training in OMR,Chennai
AWS Training in Chennai |Best Amazon Web Services Training in Chennai

Amazon Web Services Training in Tambaram, Chennai|Best AWS Training in Tambaram, Chennai

I recently came across your blog and have been reading along. I thought I would leave my first comment.
Python training in marathahalli | Python training institute in pune

I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. Cool Mat.
Python training in marathahalli | Python training institute in pune

I always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
Java training in Chennai | Java training in Bangalore

Java interview questions and answers | Core Java interview questions and answers

Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!
angularjs Training in bangalore

angularjs online Training

angularjs Training in marathahalli

angularjs interview questions and answers

angularjs Training in bangalore

angularjs Training in bangalore

angularjs Training in chennai

This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolite festivity to pity. I appreciated what you ok extremely here.
Data Science training in Chennai | Data Science Training Institute in Chennai
Data science training in Bangalore | Data Science Training institute in Bangalore
Data science training in pune | Data Science training institute in Pune
Data science online training | online Data Science certification Training-Gangboard
Data Science Interview questions and answers

I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
excel advanced excel training in bangalore | Devops Training in Chennai

Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

A universal message I suppose, not giving up is the formula for success I think. Some things take longer than others to accomplish, so people must understand that they should have their eyes on the goal, and that should keep them motivated to see it out til the end.
python Course in Pune
python Course institute in Chennai
python Training institute in Bangalore

This comment has been removed by the author.
This comment has been removed by the author.

You might comment on the order system of the blog. You should chat it's splendid. Your blog audit would swell up your visitors. I was very pleased to find this site.I wanted to thank you for this great read!!
One Machine Learning
One data science
Bissi.Global

This comment has been removed by the author.

Thanks for sharing this information.
RR technosoft offering DevOps training in hyderabad .DevOps Training in Hyderabad At RR Technosoft, we build students capabilities and leadership skills at every level and every opportunity. We do this to help build internal support, get to real issues, and reach practical recommendations. We bring out the capabilities of students to fully participate in the training and lead any project work. We are passionate about taking on immense challenges that matter to our students and often,to the world.
Get more information call us :7680001943

Thanks for sharing this information very interseting blog!!!
RR technosoft offering DevOps online training in hyderabad .RR Technosoft offers DevOps training in Hyderabad. Get trained by 15+ years of real-time IT experience, 4+ years of DevOps & AWS experience. RR Technosoft is one of the trusted institutes for DevOps Online training in Hyderabad. Get more information call us:7680001943

RR Technosoft offering Best DevOps Training in Hyderabad.Get trained by 15+ years of real-time IT experience, 4+ years of DevOps & AWS experience. RR Technosoft is one of the trusted institutes for DevOps classroom & Online training.For more information contact (+91)-7680001943.

This Was An Amazing ! I Haven't Seen This Type of Blog Ever ! Thankyou For Sharing.
RR Technosoft offering Best DevOps Training in Hyderabad.Get trained by 15+ years of real-time IT experience, 4+ years of DevOps & AWS experience. RR Technosoft is one of the trusted institutes for DevOps classroom & Online training.For more information contact (+91)-7680001943.




This comment has been removed by the author.

Nice Bog! Thank you for sharing the valuable information.
Java Online Training in ONLINE IT GURU

Digital Lync offers one of the best Online Courses Hyderabad with a comprehensive course curriculum with Continuous Integration, Delivery, and Testing. Elevate your practical knowledge with quizzes, assignments, Competitions, and Hackathons to give a boost to your confidence with our hands-on Full Stack Training. An advantage of the online Cources development course in Hyderabad from Digital Lync is to get industry-ready with Career Guidance and Interview preparation.
DevOps Training Institute
Python Training Institute
AWS Training Institute
Online Full Stack Developer Course Hyderabad
Python Course Hyderabad
Online AWS Training Course Hyderabad
devops training in hyderabad
angular training in hyderabad

Thanks for sharing this post. This is an informative post. I should say that this is the best blog section to learn Java. I am doing a Full Stack Python Internship and it would be nice if you can share a post about frameworks. Keep posting.

Really awesome blog, Informative and knowledgeable content. Thanks for sharing this stuff with us. Keep sharing more and Thank you.
Data Science Training Institute in Hyderabad

informative blog , keep posting and dont forget to checkout our blog java classes in satara

Post a Comment