xtd 0.2.0
Loading...
Searching...
No Matches
xtd::argument_out_of_range_exception Class Reference
Inheritance diagram for xtd::argument_out_of_range_exception:
xtd::argument_exception xtd::system_exception xtd::exception xtd::object

Definition

The exception that is thrown when one of the arguments provided to a method is out of range.

Header
#include <xtd/argument_out_of_range_exception>
Namespace
xtd
Library
xtd.core
Examples
The following example demonstrates how to throw and catch an xtd::argument_out_of_range_exception.
Examples
application_and_exception.cpp, and format_exception.cpp.

Public Constructors

 argument_out_of_range_exception (const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class xtd::argument_out_of_range_exception.
 
 argument_out_of_range_exception (const xtd::string &message, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 
 argument_out_of_range_exception (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 
 argument_out_of_range_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 xtd::argument_out_of_range_exception.
 

Public static Methods

template<typename value_t >
static void throw_if_equal (const value_t &value, const value_t &other, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is equal to other.
 
template<typename value_t >
static void throw_if_less_than (const value_t &value, const value_t &other, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is less than other.
 
template<typename value_t >
static void throw_if_less_than_or_equal (const value_t &value, const value_t &other, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is less than or equal to other.
 
template<typename value_t >
static void throw_if_greater_than (const value_t &value, const value_t &other, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is greater than other.
 
template<typename value_t >
static void throw_if_greater_than_or_equal (const value_t &value, const value_t &other, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is greater than or equal to other.
 
template<typename value_t >
static void throw_if_negative (const value_t &value, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is negative.
 
template<typename value_t >
static void throw_if_negative_or_zero (const value_t &value, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is negative or zero.
 
template<typename value_t >
static void throw_if_not_equal (const value_t &value, const value_t &other, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is not equal to other.
 
template<typename value_t >
static void throw_if_positive (const value_t &value, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is positive.
 
template<typename value_t >
static void throw_if_positive_or_zero (const value_t &value, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is positive or zero.
 
template<typename value_t >
static void throw_if_zero (const value_t &value, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an xtd::argument_out_of_range_exception if value is zero.
 

Additional Inherited Members

- Public Types inherited from xtd::exception
using exception_ref = std::optional< std::reference_wrapper< const std::exception > >
 Optional reference wrapper on std::exception.
 
- Public Member Functions inherited from xtd::argument_exception
 argument_exception (const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class argument_exception.
 
 argument_exception (const xtd::string &message, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class argument_exception.
 
 argument_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 argument_exception.
 
 argument_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 argument_exception.
 
 argument_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 argument_exception.
 
 argument_exception (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class argument_exception.
 
 argument_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 argument_exception.
 
 argument_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 argument_exception.
 
 argument_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 argument_exception.
 
 argument_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 argument_exception.
 
- Public Member Functions inherited from xtd::system_exception
 system_exception (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const std::optional< xtd::string > &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
template<typename exception_t >
 system_exception (const std::optional< xtd::string > &message, const exception_t &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class access_violation_exception.
 
 system_exception (const xtd::string &message, const std::error_code &error, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const xtd::string &message, const xtd::string &help_link, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const xtd::string &message, const std::error_code &error, const xtd::string &help_link, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const xtd::string &message, const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const xtd::string &message, const std::exception &inner_exception, const std::error_code &error, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const xtd::string &message, const std::exception &inner_exception, const xtd::string &help_link, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_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 &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
virtual const xtd::stringfile_path () const noexcept
 Gets file path where exception occurred.
 
virtual xtd::size line_number () const noexcept
 Gets Line number where the exception occurred.
 
virtual const xtd::stringmember_name () const noexcept
 Gets file member where exception occurred.
 
virtual const xtd::stringname () const noexcept
 Gets full class name the exception.
 
- Public Member Functions inherited from xtd::exception
 exception (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class exception.
 
 exception (const std::optional< xtd::string > &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class exception.
 
template<typename exception_t >
 exception (const std::optional< xtd::string > &message, const exception_t &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class exception.
 
virtual const xtd::stringhelp_link () const noexcept
 Gets a link to the help file associated with this exception.
 
virtual void help_link (const xtd::string &value) noexcept
 Sets a link to the help file associated with this exception.
 
virtual int32 h_result () const noexcept
 Gets HRESULT, a coded numerical value that is assigned to a specific exception.
 
virtual void h_result (int32 value) noexcept
 Sets HRESULT, a coded numerical value that is assigned to a specific exception.
 
virtual const std::error_code & error_code () const noexcept
 Gets error associate to the exception.
 
virtual void error_code (const std::error_code &value) noexcept
 Sets error associate to the exception.
 
virtual exception_ref inner_exception () const noexcept
 Gets the exception instance that caused the current exception.
 
virtual const xtd::stringmessage () const noexcept
 Gets message associate to the exception.
 
virtual const xtd::stringsource () const noexcept
 Gets the name of the application or the object that causes the error.
 
virtual void source (const xtd::string &value) noexcept
 Sets the name of the application or the object that causes the error.
 
virtual xtd::string stack_trace () const noexcept
 Gets a string representation of the immediate frames on the call stack.
 
virtual const xtd::diagnostics::stack_frameget_last_stack_frame () const noexcept
 Gets the last stack frame where the exception occurred.
 
xtd::string to_string () const noexcept override
 Returns a string that represents the current exception.
 
const char * what () const noexcept override
 Gets message associate to the exception.
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Static Public Member Functions inherited from xtd::argument_exception
static void throw_if_empty (const xtd::string &argument, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an exception if argument is empty.
 
static void throw_if_empty_or_white_space (const xtd::string &argument, const xtd::string &param_name=xtd::string::empty_string, const xtd::diagnostics::stack_frame &info=xtd::diagnostics::stack_frame::empty())
 Throws an exception if argument is empty, or consists only of white-space characters.
 
- Static Public Member Functions inherited from xtd::exception
static bool enable_stack_trace () noexcept
 Gets if the generation of the stack trace is enabled.
 
static void enable_stack_trace (bool enable) noexcept
 Sets if the generation of the stack trace is enabled. @paran enable triue if stack trace enabled; otherwhise false.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ argument_out_of_range_exception() [1/10]

xtd::argument_out_of_range_exception::argument_out_of_range_exception ( const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty())
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.
Remarks
Message is set with the default message associate to the exception.

◆ argument_out_of_range_exception() [2/10]

xtd::argument_out_of_range_exception::argument_out_of_range_exception ( const xtd::string message,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ argument_out_of_range_exception() [3/10]

xtd::argument_out_of_range_exception::argument_out_of_range_exception ( const xtd::string message,
const std::error_code &  error,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
errorError code associate to the exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ argument_out_of_range_exception() [4/10]

xtd::argument_out_of_range_exception::argument_out_of_range_exception ( const xtd::string message,
const xtd::string help_link,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
help_linkHelp link string associate to the exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ argument_out_of_range_exception() [5/10]

xtd::argument_out_of_range_exception::argument_out_of_range_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() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
errorError code associate to the exception.
help_linkHelp link string associate to the exception.

◆ argument_out_of_range_exception() [6/10]

xtd::argument_out_of_range_exception::argument_out_of_range_exception ( const std::exception &  inner_exception,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
inner_exceptionThe exception that is the cause of the current exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.
Remarks
Message is set with the default message associate to the exception.

◆ argument_out_of_range_exception() [7/10]

xtd::argument_out_of_range_exception::argument_out_of_range_exception ( const xtd::string message,
const std::exception &  inner_exception,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ argument_out_of_range_exception() [8/10]

xtd::argument_out_of_range_exception::argument_out_of_range_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() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
errorError code associate to the exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ argument_out_of_range_exception() [9/10]

xtd::argument_out_of_range_exception::argument_out_of_range_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() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
help_linkHelp link string associate to the exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ argument_out_of_range_exception() [10/10]

xtd::argument_out_of_range_exception::argument_out_of_range_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() 
)
inlineexplicit

Create a new instance of class xtd::argument_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
errorError code associate to the exception.
help_linkHelp link string associate to the exception.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

Member Function Documentation

◆ throw_if_equal()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_equal ( const value_t &  value,
const value_t &  other,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is equal to other.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as not equal to other.
otherThe value to compare with value.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_less_than()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_less_than ( const value_t &  value,
const value_t &  other,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is less than other.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as greater than or equal to other.
otherThe value to compare with value.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_less_than_or_equal()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_less_than_or_equal ( const value_t &  value,
const value_t &  other,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is less than or equal to other.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as greater than other.
otherThe value to compare with value.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_greater_than()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_greater_than ( const value_t &  value,
const value_t &  other,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is greater than other.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as less than or equal to other.
otherThe value to compare with value.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_greater_than_or_equal()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_greater_than_or_equal ( const value_t &  value,
const value_t &  other,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is greater than or equal to other.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as less than other.
otherThe value to compare with value.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_negative()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_negative ( const value_t &  value,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is negative.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as non-negative.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_negative_or_zero()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_negative_or_zero ( const value_t &  value,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is negative or zero.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as non-zero or non-negative.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_not_equal()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_not_equal ( const value_t &  value,
const value_t &  other,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is not equal to other.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as equal to other.
otherThe value to compare with value.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_positive()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_positive ( const value_t &  value,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is positive.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as non-positive.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_positive_or_zero()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_positive_or_zero ( const value_t &  value,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is positive or zero.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as non-zero or non-positive.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

◆ throw_if_zero()

template<typename value_t >
static void xtd::argument_out_of_range_exception::throw_if_zero ( const value_t &  value,
const xtd::string param_name = xtd::string::empty_string,
const xtd::diagnostics::stack_frame info = xtd::diagnostics::stack_frame::empty() 
)
inlinestatic

Throws an xtd::argument_out_of_range_exception if value is zero.

Template Parameters
value_tThe type of the object to validate.
Parameters
valueThe argument to validate as non-zero.
param_name(optional) The name of the parameter with which value corresponds.
information(optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically current_stack_frame_.

The documentation for this class was generated from the following file: