标准库头文件 <stdexcept>
来自cppreference.com
此头文件是错误处理库的一部分。
类
指示违背逻辑前条件或类不变式的异常类 (类) | |
报告无效实参的异常类 (类) | |
报告定义域错误的异常类 (类) | |
报告试图超出最大允许大小的异常类 (类) | |
报告实参处于预期范围之外的异常类 (类) | |
指示只可于运行时检测的条件的异常类 (类) | |
报告内部计算中值域错误的异常类 (类) | |
报告算术上溢的异常类 (类) | |
报告算术下溢的异常类 (类) |
概要
namespace std { class logic_error; class domain_error; class invalid_argument; class length_error; class out_of_range; class runtime_error; class range_error; class overflow_error; class underflow_error; }
类
class logic_error : public exception { public: explicit logic_error(const string& what_arg); explicit logic_error(const char* what_arg); }; class domain_error : public logic_error { public: explicit domain_error(const string& what_arg); explicit domain_error(const char* what_arg); }; class invalid_argument : public logic_error { public: explicit invalid_argument(const string& what_arg); explicit invalid_argument(const char* what_arg); }; class length_error : public logic_error { public: explicit length_error(const string& what_arg); explicit length_error(const char* what_arg); }; class out_of_range : public logic_error { public: explicit out_of_range(const string& what_arg); explicit out_of_range(const char* what_arg); }; class runtime_error : public exception { public: explicit runtime_error(const string& what_arg); explicit runtime_error(const char* what_arg); }; class range_error : public runtime_error { public: explicit range_error(const string& what_arg); explicit range_error(const char* what_arg); }; class overflow_error : public runtime_error { public: explicit overflow_error(const string& what_arg); explicit overflow_error(const char* what_arg); }; class underflow_error : public runtime_error { public: explicit underflow_error(const string& what_arg); explicit underflow_error(const char* what_arg); };