在线文档教程
C++
应用 | Utilities

std::exception

std::exception

Defined in header
class exception;

Provides consistent interface to handle errors through the throw expression.

All exceptions generated by the standard library inherit from std::exception.

  • logic_error

Member functions

(constructor)constructs the exception object (public member function)
(destructor) virtualdestructs the exception object (virtual public member function)
operator=copies exception object (public member function)
what virtualreturns an explanatory string (virtual public member function)

© cppreference.com

Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.

http://en.cppreference.com/w/cpp/error/exception