xtd 0.2.0
Loading...
Searching...
No Matches
out_of_memory_exception.h
Go to the documentation of this file.
1
4#pragma once
5#include "system_exception.h"
6
8namespace xtd {
24 public:
26
40 explicit out_of_memory_exception(const xtd::string& message, const std::error_code& error, const xtd::diagnostics::stack_frame& info = xtd::diagnostics::stack_frame::empty()) : system_exception(message, error, info) {}
66 explicit out_of_memory_exception(const xtd::string& message, const std::exception& inner_exception, const std::error_code& error, const xtd::diagnostics::stack_frame& info = xtd::diagnostics::stack_frame::empty()) : system_exception(message, inner_exception, error, info) {}
79 explicit out_of_memory_exception(const xtd::string& message, const std::exception& inner_exception, const std::error_code& error, const xtd::string& help_link, const xtd::diagnostics::stack_frame& info = xtd::diagnostics::stack_frame::empty()) : system_exception(message, inner_exception, error, help_link, info) {}
81
84 out_of_memory_exception& operator =(const out_of_memory_exception&) = default;
86
87 private:
88 const char* default_message() const noexcept {return "Insufficient memory to continue the execution of the program"_t;}
89 };
90}
91
108#define out_of_memory_exception_(...) out_of_memory_exception(add_csf_(__VA_ARGS__))
Represents text as a sequence of character units.
Definition basic_string.h:79
static stack_frame empty() noexcept
Return an empty stack frame.
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:40
out_of_memory_exception(const std::exception &inner_exception, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:55
out_of_memory_exception(const xtd::string &message, const std::error_code &error, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:40
out_of_memory_exception(const xtd::string &message, const std::error_code &error, const xtd::string &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:50
out_of_memory_exception(const xtd::string &message, const std::exception &inner_exception, const std::error_code &error, const xtd::string &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:79
out_of_memory_exception(const xtd::string &message, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:35
out_of_memory_exception(const xtd::string &message, const std::exception &inner_exception, const std::error_code &error, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:66
out_of_memory_exception(const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:31
out_of_memory_exception(const xtd::string &message, const std::exception &inner_exception, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:60
out_of_memory_exception(const xtd::string &message, const std::exception &inner_exception, const xtd::string &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:72
out_of_memory_exception(const xtd::string &message, const xtd::string &help_link, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
Create a new instance of class out_of_memory_exception.
Definition out_of_memory_exception.h:45
The exception that is thrown when one of the arguments provided to a method is not valid.
Definition out_of_memory_exception.h:23
virtual const xtd::string & help_link() const noexcept
Gets a link to the help file associated with this exception.
virtual exception_ref inner_exception() const noexcept
Gets the exception instance that caused the current exception.
virtual const xtd::string & message() const noexcept
Gets message associate to the exception.
Defines the base class for predefined exceptions in the xtd namespace.
Definition system_exception.h:24
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::system_exception exception.