`
lovecontry
  • 浏览: 1035711 次
文章分类
社区版块
存档分类
最新评论

A throw-expression with no operand in C++

 
阅读更多

A throw-expression with no operand re-throws the exception currently being handled. Such an expression should appear only in a catch handler or in a function called from within a catch handler. The re-thrown exception object is the original exception object (not a copy). For example:

An empty throw statement tells the compiler that the function does not throw any exceptions. It is the equivalent to using__declspec(nothrow). For example:

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics