Namespaces
Variants
Actions

Standard library header <stdexcept>

From cppreference.com
< cpp‎ | header
 
 
Standard library headers
 

This header is part of the error handling library.

Contents

Classes

exception class to indicate violations of logical preconditions or class invariants
(class)[edit]
exception class to report invalid arguments
(class)[edit]
exception class to report domain errors
(class)[edit]
exception class to report attempts to exceed maximum allowed size
(class)[edit]
exception class to report arguments outside of expected range
(class)[edit]
exception class to indicate conditions only detectable at run time
(class)[edit]
exception class to report range errors in internal computations
(class)[edit]
exception class to report arithmetic overflows
(class)[edit]
exception class to report arithmetic underflows
(class)[edit]

[edit]Synopsis

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;}

[edit]Class std::logic_error

namespace std {class logic_error :public exception {public:explicit logic_error(const string& what_arg);explicit logic_error(constchar* what_arg);};}

[edit]Class std::domain_error

namespace std {class domain_error :public logic_error {public:explicit domain_error(const string& what_arg);explicit domain_error(constchar* what_arg);};}

[edit]Class std::invalid_argument

namespace std {class invalid_argument :public logic_error {public:explicit invalid_argument(const string& what_arg);explicit invalid_argument(constchar* what_arg);};}

[edit]Class std::length_error

namespace std {class length_error :public logic_error {public:explicit length_error(const string& what_arg);explicit length_error(constchar* what_arg);};}

[edit]Class std::out_of_range

namespace std {class out_of_range :public logic_error {public:explicit out_of_range(const string& what_arg);explicit out_of_range(constchar* what_arg);};}

[edit]Class std::runtime_error

namespace std {class runtime_error :public exception {public:explicit runtime_error(const string& what_arg);explicit runtime_error(constchar* what_arg);};}

[edit]Class std::range_error

namespace std {class range_error :public runtime_error {public:explicit range_error(const string& what_arg);explicit range_error(constchar* what_arg);};}

[edit]Class std::overflow_error

namespace std {class overflow_error :public runtime_error {public:explicit overflow_error(const string& what_arg);explicit overflow_error(constchar* what_arg);};}

[edit]Class std::underflow_error

namespace std {class underflow_error :public runtime_error {public:explicit underflow_error(const string& what_arg);explicit underflow_error(constchar* what_arg);};}

[edit]See also

base class for exceptions thrown by the standard library components
(class)[edit]
close