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.
argument_null_exception.h
Go to the documentation of this file.
1 #pragma once
5 #include "argument_exception.h"
6 
8 namespace xtd {
17  public:
25  explicit argument_null_exception(const std::string& message, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, info) {}
30  explicit argument_null_exception(const std::string& message, const std::error_code& error, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, error, info) {}
35  explicit argument_null_exception(const std::string& message, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, help_link, info) {}
40  explicit argument_null_exception(const std::string& message, const std::error_code& error, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, error, help_link, info) {}
45  argument_null_exception(const std::exception& inner_exception, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(default_message(), inner_exception, info) {}
50  explicit argument_null_exception(const std::string& message, const std::exception& inner_exception, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, inner_exception, info) {}
56  explicit argument_null_exception(const std::string& message, const std::exception& inner_exception, const std::error_code& error, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, inner_exception, error, info) {}
62  explicit argument_null_exception(const std::string& message, const std::exception& inner_exception, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, inner_exception, help_link, info) {}
69  explicit argument_null_exception(const std::string& message, const std::exception& inner_exception, const std::error_code& error, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : argument_exception(message, inner_exception, error, help_link, info) {}
70 
73  argument_null_exception& operator=(const argument_null_exception&) = default;
75 
76  private:
77  const char* default_message() const {return "Value cannot be null."_t;}
78  };
79 }
The exception that is thrown when one of the arguments provided to a method is null.
Definition: argument_null_exception.h:16
argument_null_exception(const std::string &message, const std::exception &inner_exception, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:50
argument_null_exception(const std::string &message, const std::error_code &error, const std::string &help_link, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:40
virtual const std::string & message() const noexcept
Get message associate to the exception.
Definition: system_exception.h:115
static xtd::caller_info empty() noexcept
Return an empty caller info.
Definition: caller_info.h:36
argument_null_exception(const std::string &message, const std::exception &inner_exception, const std::string &help_link, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:62
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:16
argument_null_exception(const std::string &message, const std::error_code &error, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:30
virtual const std::string & help_link() const noexcept
Gets a link to the help file associated with this exception.
Definition: system_exception.h:91
argument_null_exception(const std::string &message, const std::exception &inner_exception, const std::error_code &error, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:56
virtual exception_ref inner_exception() const noexcept
Gets the exception instance that caused the current exception.
Definition: system_exception.h:103
caller_info information class is used to store current file, current line and current function inform...
Definition: caller_info.h:18
The exception that is thrown when one of the arguments provided to a method is not valid...
Definition: argument_exception.h:16
virtual std::error_code error() const noexcept
Get error associate to the exception.
Definition: system_exception.h:99
argument_null_exception(const std::string &message, const std::exception &inner_exception, const std::error_code &error, const std::string &help_link, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:69
argument_null_exception(const std::string &message, const std::string &help_link, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:35
argument_null_exception(const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:21
argument_null_exception(const std::string &message, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:25
Contains xtd::argument_exception exception.
argument_null_exception(const std::exception &inner_exception, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class argument_null_exception.
Definition: argument_null_exception.h:45