Cpp Standard Library 简明教程

C++ Library - <stdexcept>

Introduction

这是一组异常类,此头文件定义了一组标准异常,库和程序都可以使用它们来报告常见错误。

It is an exception classes and this header defines a set of standard exceptions that both the library and programs can use to report common errors.

Classes

Sr.No.

Logic error & description

1

logic_errorIt is a logic error exception.

2

domain_errorIt is a domain error exception.

3

invalid_argumentIt is an invalid argument exception.

4

length_errorIt is a length error exception.

5

out_of_rangeIt is an out-of-range exception.

Convenience interfaces

Sr.No.

Interface & description

1

runtime_errorIt is a runtime error exception.

2

range_errorIt is a range error exception.

3

overflow_errorIt is an overflow error exception.

4

underflow_errorIt is an underflow error exception.