D
Dave
try
{
...
}
catch (exception e)
{
cout << e.what() << endl;
}
In the code above, e is caught by value rather than polymorphically (assume
that what was thrown is derived from exception). What does the Standard say
about whether or not the call to e.what() will do the right thing? Is it
guaranteed to work, guaranteed to not work or implementation defined?
Thanks,
Dave
{
...
}
catch (exception e)
{
cout << e.what() << endl;
}
In the code above, e is caught by value rather than polymorphically (assume
that what was thrown is derived from exception). What does the Standard say
about whether or not the call to e.what() will do the right thing? Is it
guaranteed to work, guaranteed to not work or implementation defined?
Thanks,
Dave