22 Diagnostics library [diagnostics]

22.2 Exception classes [std.exceptions]

22.2.3 Class domain_­error [domain.error]

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

Класс domain_­error определяет тип объектов, создаваемых реализацией как исключения для сообщения об ошибках домена.

domain_error(const string& what_arg);

Effects: Создает объект класса domain_­error.

Postconditions: strcmp(what(), what_­arg.c_­str()) == 0.

domain_error(const char* what_arg);

Effects: Создает объект класса domain_­error.

Postconditions: strcmp(what(), what_­arg) == 0.