try
1. do not need exception message
try
{
//
}
catch (...)
{
//
}
2. need exception message
try
{
//
}
catch (const std::exception& e) // reference to the base of a polymorphic object
{
std::cout << e.what(); // information from length_error printed
}