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.
overflow_exception.h
1 #pragma once
2 #include "arithmetic_exception.h"
3 
5 namespace xtd {
13  public:
21  explicit overflow_exception(const std::string& message, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, info) {}
26  explicit overflow_exception(const std::string& message, const std::error_code& error, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, error, info) {}
31  explicit overflow_exception(const std::string& message, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, help_link, info) {}
36  explicit overflow_exception(const std::string& message, const std::error_code& error, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, error, help_link, info) {}
41  overflow_exception(const std::exception& inner_exception, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(default_message(), inner_exception, info) {}
46  explicit overflow_exception(const std::string& message, const std::exception& inner_exception, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, inner_exception, info) {}
52  explicit overflow_exception(const std::string& message, const std::exception& inner_exception, const std::error_code& error, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, inner_exception, error, info) {}
58  explicit overflow_exception(const std::string& message, const std::exception& inner_exception, const std::string& help_link, const xtd::caller_info& info = xtd::caller_info::empty()) : arithmetic_exception(message, inner_exception, help_link, info) {}
65  explicit overflow_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()) : arithmetic_exception(message, inner_exception, error, help_link, info) {}
66 
68  overflow_exception(const overflow_exception&) = default;
69  overflow_exception& operator=(const overflow_exception&) = default;
71 
72  private:
73  const char* default_message() const {return "Arithmetic operation resulted in an overflow."_t;}
74  };
75 }
The exception that is thrown for errors in an arithmetic, casting, or conversion operation.
Definition: arithmetic_exception.h:12
virtual const std::string & help_link() const noexcept
Gets a link to the help file associated with this exception.
Definition: system_exception.h:87
virtual exception_ref inner_exception() const noexcept
Gets the exception instance that caused the current exception.
Definition: system_exception.h:99
virtual const std::string & message() const noexcept
Get message associate to the exception.
Definition: system_exception.h:111
overflow_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 overflow_exception.
Definition: overflow_exception.h:36
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:15
virtual std::error_code error() const noexcept
Get error associate to the exception.
Definition: system_exception.h:95
overflow_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 overflow_exception.
Definition: overflow_exception.h:58
overflow_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 overflow_exception.
Definition: overflow_exception.h:26
static xtd::caller_info empty() noexcept
Return an empty caller info.
Definition: caller_info.h:32
overflow_exception(const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class overflow_exception.
Definition: overflow_exception.h:17
caller_info information class is used to store current file, current line and current function inform...
Definition: caller_info.h:14
The exception that is thrown when an arithmetic, casting, or conversion operation in a checked contex...
Definition: overflow_exception.h:12
overflow_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 overflow_exception.
Definition: overflow_exception.h:31
overflow_exception(const std::exception &inner_exception, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class overflow_exception.
Definition: overflow_exception.h:41
overflow_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 overflow_exception.
Definition: overflow_exception.h:46
overflow_exception(const std::string &message, const xtd::caller_info &info=xtd::caller_info::empty())
Create a new instance of class overflow_exception.
Definition: overflow_exception.h:21
overflow_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 overflow_exception.
Definition: overflow_exception.h:65
overflow_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 overflow_exception.
Definition: overflow_exception.h:52