Where user defined exception stores?

Showing Answers 1 - 6 of 6 Answers

hi_goura

  • Dec 4th, 2006
 

User defined exception is nothing but a sub-class of Exeption class. And when you are trying to throw or catch thatexception, an object of that will be created. And the basic concept says all the objects are stored in Heap memory.And your exception also...ThanksGourahari

  Was this answer useful?  Yes

Suresh R

  • Mar 1st, 2007
 

Whenever a customized exception is to be thrown to the user, then the customized or user defined exception classes are created.  These classes basically extends the Exception class.
When the exception occurs, the exception is caught and the customized exception is thrown to the user which inturn will be handled and displays an error page.

E.g.,
..........
try{
.............
}catch (SQLException e){
  throw DataBaseError ("No access for the user", e);
}
..........

The exception will be handled either in the deployment descriptor and handled or by the calling method and it will be handled appropriately.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions