说我有代码
try
{
....
}
catch()
{
.... // exception occur here ... how to handled.
}
c ++中是否有任何机制可以处理上述情况。
如果您认为这是您真正想要的,则可以这样做:
try
{
try
{
//...
}
catch( ... )
{
//...
if( .. )
throw std::runtime_exception( "error occured" );
}
}
catch( std::runtime_exception& e )
{
// handle exception of exception handler
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句