Files
cppdraft_translate/cppdraft/domain/error.md
2025-10-25 03:02:53 +03:00

1.2 KiB

[domain.error]

19 Diagnostics library [diagnostics]

19.2 Exception classes [std.exceptions]

19.2.4 Class domain_error [domain.error]

🔗

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

1

#

The classdomain_error defines the type of objects thrown as exceptions by the implementation to report domain errors.

🔗

constexpr domain_error(const string& what_arg);

2

#

Postconditions: strcmp(what(), what_arg.c_str()) == 0.

🔗

constexpr domain_error(const char* what_arg);

3

#

Postconditions: strcmp(what(), what_arg) == 0.