avatar
c++ exception 一问# Programming - 葵花宝典
yy
1
suppose I have a statement like:
throw;
(throw without a type exception)
Can I know what is the default exception for c++?
It seems to me: if there is no outer layer exception, statement
throw ;
will return a notype exception and cause Abort anyway even if
I use
catch (...)
Any idea, thanks,
avatar
c*e
2
throw without an operand means re-throw. if re-throw is used in a context
when
there is no exception, terminate () will be called.

【在 yy 的大作中提到】
: suppose I have a statement like:
: throw;
: (throw without a type exception)
: Can I know what is the default exception for c++?
: It seems to me: if there is no outer layer exception, statement
: throw ;
: will return a notype exception and cause Abort anyway even if
: I use
: catch (...)
: Any idea, thanks,

avatar
yy
3
Thanks for confirmation, this is exactly what I guess :)

【在 c********e 的大作中提到】
: throw without an operand means re-throw. if re-throw is used in a context
: when
: there is no exception, terminate () will be called.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。