std::logic_error
来自cppreference.com
![]() |
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <stdexcept> 中定义
|
||
class logic_error; |
||
定义一个类型的对象抛出异常。它是一个错误的逻辑后果内的程序,如违反逻辑的先决条件或类不变量,是可以预防的报告错误.
原文:
Defines a type of object to be thrown as exception. It reports errors that are a consequence of faulty logic within the program such as violating logical preconditions or class invariants and may be preventable.
[编辑] 成员函数
构造异常对象 (公共成员函数) |
继承自 std::exception
Member functions
[虚]</div></div>
|
析构该异常对象 ( std::exception 的公有虚成员函数)
|
[虚]</div></div>
|
返回一个说明字符串 ( std::exception 的公有虚成员函数)
|
</div>