由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - c++ exception 一问
相关主题
c++:exception 一问请教:函数后面的 throw() 有意义么?
C++ Q15: throw关于 exception 的一个问题
一道编程题 - throw ExceptionsC++ 用户定义exception的标准用法是什么?
Two questions about handling exceptions in C++大家对 exception 都是怎么处理的?
C++ exception handling 一问C++ Q17: throw 2
How to resolve "terminate called after throwing an instance of 'std::bad_alloc'???编程题一道
A try-catch problem in C++try catch question
c++ exception请教一个c++ throw exception 问题
相关话题的讨论汇总
话题: exception话题: throw话题: c++话题: statement话题: abort
进入Programming版参与讨论
1 (共1页)
yy
发帖数: 45
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,
c********e
发帖数: 383
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,

yy
发帖数: 45
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.

1 (共1页)
进入Programming版参与讨论
相关主题
请教一个c++ throw exception 问题C++ exception handling 一问
Exception 问题求助How to resolve "terminate called after throwing an instance of 'std::bad_alloc'???
C++ try {} catch(...){} 能扑捉一切异常吗?A try-catch problem in C++
Exceptionc++ exception
c++:exception 一问请教:函数后面的 throw() 有意义么?
C++ Q15: throw关于 exception 的一个问题
一道编程题 - throw ExceptionsC++ 用户定义exception的标准用法是什么?
Two questions about handling exceptions in C++大家对 exception 都是怎么处理的?
相关话题的讨论汇总
话题: exception话题: throw话题: c++话题: statement话题: abort