Exception Handling in c++, Programming Languages

Exception handling
Exception handling is a mechanism that separates code that detects and handles exceptional circumstances from the rest of your program. Note that an exceptional circumstance is not necessarily an error.

When a function detects an exceptional situation, you represent this with an object. This object is called an exception object. In order to deal with the exceptional situation you throw the exception. This passes control, as well as the exception, to a designated block of code in a direct or indirect caller of the function that threw the exception. This block of code is called a handler. In a handler, you specify the types of exceptions that it may process. The C++ run time, together with the generated code, will pass control to the first appropriate handler that is able to process the exception thrown. When this happens, an exception is caught. A handler may rethrow an exception so it can be caught by another handler.

The exception handling mechanism is made up of the following elements:

try blocks
catch blocks
throw expressions
Exception specifications (C++ only)
Posted Date: 4/22/2012 7:43:08 AM | Location : United States







Related Discussions:- Exception Handling in c++, Assignment Help, Ask Question on Exception Handling in c++, Get Answer, Expert's Help, Exception Handling in c++ Discussions

Write discussion on Exception Handling in c++
Your posts are moderated
Related Questions
The Lost Bay Software Coop purchased EnviroMeasurements, a small startup with a product, GreenStation, that measures pollen count and air quality. The company has ventured

Write a pseudocode for a program that reads a temperature as a whole number from a user and outputs a “probable” season (winter, sprint, summer, or fall) depending on the temperatu

We'll start this section off with the material which most text books that will cover in this section. We will take the matter from the Second Order chapter and expand this out to n

We now require starting looking into finding a particular solution for n th order differential equations. The two ways which we'll be looking at are similar as those which we look

How to create an ER diagram?

Hi, Can you do exercises: D2, D3, D4, and D5 on page 230 of the following book: http://www.daimi.au.dk/~bra8130/Wiley_book/wiley.html . The book can be downloaded for free from t

Windows Communication Foundation The Microsoft windows Interaction or communication foundation (or WCF), formerly known as "Indigo", is an application selection program (API) in th

i need a coding to glow 8 LEDs on a port with pwm effect

1.  A function that produces the Collatz sequence and counts the number of terms. 2.  A main function that calculates interesting values about the Collatz sequence. 1.The Col

We want a program, a logic, we can list the intermediate films sandwiched between the 2 tapes (from - to) that indicates the user. example: From to