首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::exception::exception

exception();

(1)

?

exception( const exception& other );

(2)

?

构造新的异常对象。

1%29默认构造函数。what()返回空字符串。

2%29复制构造函数。将内容初始化为other

参数

other

-

another exception to assign the contents of

例外

(none)

(until C++11)

noexcept specification: noexcept

(since C++11)

注记

因为复制std::exception当派生类%28(如std::runtime_error%29必须管理用户定义的诊断消息,它通常是作为一个复制到写字符串来实现的.

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com