什么是try块处理程序的功能? [英] What is the function try block handler?
本文介绍了什么是try块处理程序的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近遇到这个问题 - 什么是函数try块处理程序?
I came across this question recently - What is function try block handler?
>
推荐答案
这样写的函数:
void fun ()
try
{
.....
.....
}
catch(SomeException & e)
{
....
....
}
被称为函数try块。
这通常用于带有初始化列表的构造函数,用于捕获在构造初始化列表。
This is typically used with constructors with initialization lists to catch the exception thrown during the construction of an object constructed in the initialization list.
这篇关于什么是try块处理程序的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文