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
}
标签:std,exception,try,need,catch,message
From: https://www.cnblogs.com/shendaw/p/16999364.html