xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
abort_error.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/ustring.h>
6#include <stdexcept>
7
9namespace xtd {
11 namespace tunit {
18 class abort_error : public std::exception {
19 public:
22 explicit abort_error(const xtd::ustring& message) : message_(message) {}
23
26 explicit abort_error(const char* message) : message_(message) {}
27
29 abort_error(const abort_error&) = default;
30 abort_error& operator=(const abort_error&) = default;
32
35 const char* what() const noexcept {return message_.c_str();}
36
37 private:
38 xtd::ustring message_;
39 };
40 }
41}
Exception thow when abort.
Definition: abort_error.h:18
abort_error(const char *message)
Create a new instance of abort_error class.
Definition: abort_error.h:26
abort_error(const xtd::ustring &message)
Create a new instance of abort_error class.
Definition: abort_error.h:22
const char * what() const noexcept
Returns a string that represents the current abort_error.
Definition: abort_error.h:35
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::ustring class.