exception 클래스
이 클래스는 특정 식과 표준 C++라이브러리로, 나타난 모든 예외에 대한 기본 클래스로 사용됩니다.
class exception {
public:
exception();
exception(const char * const &message);
exception(const char * const &message, int);
exception(const exception &right);
exception& operator=(const exception &right);
virtual ~exception();
virtual const char *what() const;
};
설명
Specifically, this base class is the root of the standard exception classes defined in <stdexcept>. The C string value returned by what is left unspecified by the default constructor, but may be defined by the constructors for certain derived classes as an implementation-defined C string. None of the member functions throw any exceptions.
The int parameter allows you to specify that no memory should be allocated. The value of the int is ignored.
참고
The constructors exception(const char * const &message) and exception(const char * const &message, int) are Microsoft extensions to the Standard C++ Library.
예제
For examples of the use of the standard exception classes that inherit from the exception class, see any of the classes defined in <stdexcept>.
요구 사항
Header: <exception>
네임스페이스: std