Hello All,
I have a question ....which I am totally confused about!
If I have a fxn foo in a program which returns a logical value. But it has a posssiblity to throw some exception.
Now my exception handler returns a value as a string stating why the exception occured.
But my function can return only logical value !!!!!
How to handle that Exception !!!! For eg.
logical foo()
{
try
{
.....
.....
}
catch( Exception& e)
{
return e.show(); //bt. this would return a char* and not a logical value ..so not sure how it would work!!!
}
}
//So the way I am doing is ...the folloing ...bt. not sure ...if this is the correct way of doing it!!!
logical foo()
{
try
{
....
...
}
catch(Exception &)
{
return false;
}
}
Thank you for helping !!!