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
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

hi, can you help me with testing java classes I have wrote using java and jsp and servlet in eclipse ? I want to use JUnit for testing

I need help with having a user input a year, and my program to spit out what day of the week Christmas is on.... any helping hands on this?

Write a Fortran LOGICAL FUNCTION, called "is_prime", which determines if a given integer value is a prime number or not (A prime number is a natural number which has only two disti

Version Control is a critical tool in development and production environments that allows a user to make snapshots of working con?gurations or code. In this assignment, you will de

Select two different architecture styles to design and implement a software system and provide its Architecture Diagrams (implement the software with java)

PLEASE HELP ME ORACLE PROGRAMING TRIGGER

Write an interactive C program which prompts the user with the following options on the opening menu: 1) Student information 2) Theory counselling batch-scheduling

The ?rst task in the project is to develop a sane system to store change logs and versions of ?les. The simplest approach is to create a "dot" directory in the location of the ?le

Is it possible to get an assignment done within 2 hours