#1  
5th December 2009, 06:20 PM
lad.sonu
Junior Member
 
Join Date: Nov 2009
Posts: 1

what happens to exception object after exception handling?


what will happen to exception object after exception handling? (C++)




  #2  
19th December 2009, 11:03 AM
Rosy
Junior Member
 
Join Date: Oct 2009
Posts: 24
Default Re: what happens to exception object after exception handling?

The catch clause resets object to the value null after correcting the exception situation. This can be done by calling a destructor which releases the memory occupied by it.
  #3  
31st January 2010, 09:51 PM
amit04051988
Senior Member+
 
Join Date: Jan 2010
Location: mumbai
Posts: 681
Default Re: what happens to exception object after exception handling?

hello

The catch clause resets object to the value null after correcting the exception situation. This can be done by calling a destructor which releases the memory occupied by it.

best of luck
  #4  
3rd February 2010, 10:27 AM
ROHIT KUNDLIYA
Senior Member++
 
Join Date: Dec 2009
Posts: 1,013
Default Re: what happens to exception object after exception handling?

Every data member inside your object should clean up its own mess.

If a constructor throws an exception, the object's destructor is not run. If your object has already done something that needs to be undone (such as allocating some memory, opening a file, or locking a semaphore), this "stuff that needs to be undone" must be remembered by a data member inside the object.
Reply With Quote
  #5  
27th February 2010, 02:07 PM
Mintoo
Senior Member++
 
Join Date: Feb 2010
Location: Uttarakhand
Posts: 1,024
Default Re: what happens to exception object after exception handling?

The thrown object must be an instance of the Exception class or a subclass of Exception.......
Reply With Quote
  #6  
12th July 2010, 11:41 AM
sparkle
Senior Member+++
 
Join Date: Jun 2010
Location: kolkata
Posts: 1,734
Default Re: what happens to exception object after exception handling?

Hello friend,

The exception object is the main entity to show what kind of exception is occurring in the coding.

After an exception is thrown, the JVM built default exception handler catches the exception and stops the execution of the program.

When we use an exception handler, it handles the exception and the program runs after that.
By the object of the Exception class which is the highest priority class,the particular exception is shown whether it is an arithmetic or array index out of bounds or I/O exception.

I think your doubt has been a little cleared now.

Good luck!
Reply With Quote
  #7  
29th September 2011, 11:12 PM
ch.manoj
Senior Member+
 
Join Date: Sep 2011
Posts: 743
Wink Re: what happens to exception object after exception handling?

Hello friend,

The exception object is the main entity to show what kind of exception is occurring in the coding.

After an exception is thrown, the JVM built default exception handler catches the exception and stops the execution of the program.

When we use an exception handler, it handles the exception and the program runs after that.
By the object of the Exception class which is the highest priority class,the particular exception is shown whether it is an arithmetic or array index out of bounds or I/O exception.

I think your doubt has been a little cleared now.

Good luck!
Reply With Quote
  #8  
26th November 2011, 10:32 PM
pabitra_nayak
Senior Member+
 
Join Date: Nov 2011
Location: bhubaneswar
Posts: 607
Default Re: what happens to exception object after exception handling?

Hello friend,

The exception object is the main entity to show what kind of exception is occurring in the coding.

After an exception is thrown, the JVM built default exception handler catches the exception and stops the execution of the program.

When we use an exception handler, it handles the exception and the program runs after that.
By the object of the Exception class which is the highest priority class,the particular exception is shown whether it is an arithmetic or array index out of bounds or I/O exception.

I think your doubt has been a little cleared now.

Good luck
Reply With Quote
Do you have any question? or have anything to say?





Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
vBulletin Optimisation by vB Optimise.
Please also check: