drpraveen
May 18th, 1999, 02:04 PM
Hi!
I have a problem regarding try, catch and throw statements.....
After catching all exceptions with a catch(...) statement, I need to determine the type of the exception. Whether it is a CDBException or a CMemoryException or something else. How can I do this? I am trying to implement the following scenario across many functions:
try
{
// Processing code
}
catch(...)
{
// Do cleanup
// Rethrow a user defined exception class, for
// which I need to know the type of the exception
}
I can handle individual exceptions but it will result in the duplication of cleanup code.
looking forward to any suggestions,
Regards,
Praveen
I have a problem regarding try, catch and throw statements.....
After catching all exceptions with a catch(...) statement, I need to determine the type of the exception. Whether it is a CDBException or a CMemoryException or something else. How can I do this? I am trying to implement the following scenario across many functions:
try
{
// Processing code
}
catch(...)
{
// Do cleanup
// Rethrow a user defined exception class, for
// which I need to know the type of the exception
}
I can handle individual exceptions but it will result in the duplication of cleanup code.
looking forward to any suggestions,
Regards,
Praveen