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
A traveler wants to purchase a number of traveler''s checks, each having a set amount for four different currencies: Mexican pesos, Euro dollars, Swiss francs, and US dollars. A t

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Add macros to MS word 2010 according to A PARTICULAR FORMAT

Question 1 How will you add styles to a document? Question2 How will you view XML in different ways? Question 3 Explain various file handling mechanism available in PERL

How to create an ER diagram?

This case will lead to similar problem that we've had all other time we've run in double roots or double eigenvalues. We only find a single solution and will require a second solut

Your program can be invoked with option: -d date, where date is entered in dd/mm/yyyy format. In this case, it must only print the following string: Found cookies expiring bef

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Create a visualization (programming project) and demonstrate it in the class. The project should be related to distributed systems. (A distributed system consists of multiple auton

how can we get the data from data base to combo box in jsp page dynamically