xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
ignore_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 ignore_error : public std::exception {
19 public:
22 explicit ignore_error(const xtd::ustring& message) : message_(message) {}
23
26 explicit ignore_error(const char* message) : message_(message) {}
27
29 ignore_error(const ignore_error&) = default;
30 ignore_error& operator=(const ignore_error&) = default;
32
35 const char* what() const noexcept {return message_.c_str();}
36
37 private:
38 xtd::ustring message_;
39 };
40 }
41}
Exception to be thrown when something is ignored.
Definition ignore_error.h:18
ignore_error(const char *message)
Create a new instance of ignore_error class.
Definition ignore_error.h:26
ignore_error(const xtd::ustring &message)
Create a new instance of ignore_error class.
Definition ignore_error.h:22
const char * what() const noexcept
Returns a string that represents the current ignore_error.
Definition ignore_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.