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

Definition

The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array.

Namespace
xtd
Library
xtd.core
Examples
The following example demonstrates how to throw and catch an index_out_of_range_exception.

Public Constructors

 index_out_of_range_exception (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_exception (const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_exception (const xtd::string &message, const std::error_code &error, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_exception (const xtd::string &message, const xtd::string &help_link, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_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::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_exception (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_exception (const xtd::string &message, const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_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::current())
 Create a new instance of class index_out_of_range_exception.
 index_out_of_range_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::current())
 Create a new instance of class index_out_of_range_exception.
 index_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 &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class index_out_of_range_exception.

Additional Inherited Members

using exception_ref
 Optional reference wrapper on std::exception.
 system_exception (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::system_exception.
 system_exception (const xtd::optional< xtd::string > &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::system_exception.
template<typename exception_t>
 system_exception (const xtd::optional< xtd::string > &message, const exception_t &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::system_exception.
virtual const xtd::stringfile_path () const noexcept
 Gets file path where exception occurred.
virtual xtd::usize 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.
 system_exception (const xtd::string &message, const std::error_code &error, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::system_exception.
 system_exception (const xtd::string &message, const xtd::string &help_link, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::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::current())
 Create a new instance of class xtd::system_exception.
 system_exception (const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::system_exception.
 system_exception (const xtd::string &message, const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class xtd::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::current())
 Create a new instance of class xtd::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::current())
 Create a new instance of class xtd::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::current())
 Create a new instance of class xtd::system_exception.
 exception (const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class exception.
 exception (const xtd::optional< xtd::string > &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class exception.
template<typename exception_t>
 exception (const xtd::optional< xtd::string > &message, const exception_t &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
 Create a new instance of class exception.
virtual auto help_link () const noexcept -> const xtd::string &
 Gets a link to the help file associated with this exception.
virtual auto help_link (const xtd::string &value) noexcept -> void
 Sets a link to the help file associated with this exception.
virtual auto h_result () const noexcept -> xtd::int32
 Gets HRESULT, a coded numerical value that is assigned to a specific exception.
virtual auto h_result (xtd::int32 value) noexcept -> void
 Sets HRESULT, a coded numerical value that is assigned to a specific exception.
virtual auto error_code () const noexcept -> const std::error_code &
 Gets error associate to the exception.
virtual auto error_code (const std::error_code &value) noexcept -> void
 Sets error associate to the exception.
virtual auto inner_exception () const noexcept -> exception_ref
 Gets the exception instance that caused the current exception.
virtual auto message () const noexcept -> const xtd::string &
 Gets message associate to the exception.
virtual auto source () const noexcept -> const xtd::string &
 Gets the name of the application or the object that causes the error.
virtual auto source (const xtd::string &value) noexcept -> void
 Sets the name of the application or the object that causes the error.
virtual auto stack_trace () const noexcept -> xtd::string
 Gets a string representation of the immediate frames on the call stack.
virtual auto get_last_stack_frame () const noexcept -> const xtd::diagnostics::stack_frame &
 Gets the last stack frame where the exception occurred.
auto to_string () const noexcept -> xtd::string override
 Returns a string that represents the current exception.
auto what () const noexcept -> const char *override
 Gets message associate to the exception.
 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 xtd::usize 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::unique_ptr_object< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
static auto enable_stack_trace () noexcept -> bool
 Gets if the generation of the stack trace is enabled.
static auto enable_stack_trace (bool enable) noexcept -> void
 Sets if the generation of the stack trace is enabled. @paran enable triue if stack trace enabled; otherwise false.
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

◆ index_out_of_range_exception() [1/10]

xtd::index_out_of_range_exception::index_out_of_range_exception ( const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current())
inlineexplicit

Create a new instance of class index_out_of_range_exception.

Parameters
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().
Remarks
Message is set with the default message associate to the exception.

◆ index_out_of_range_exception() [2/10]

xtd::index_out_of_range_exception::index_out_of_range_exception ( const xtd::string & message,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() )
inlineexplicit

Create a new instance of class index_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

◆ index_out_of_range_exception() [3/10]

xtd::index_out_of_range_exception::index_out_of_range_exception ( const xtd::string & message,
const std::error_code & error,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() )
inlineexplicit

Create a new instance of class index_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
errorError code associate to the exception.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

◆ index_out_of_range_exception() [4/10]

xtd::index_out_of_range_exception::index_out_of_range_exception ( const xtd::string & message,
const xtd::string & help_link,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() )
inlineexplicit

Create a new instance of class index_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
help_linkHelp link string associate to the exception.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

◆ index_out_of_range_exception() [5/10]

xtd::index_out_of_range_exception::index_out_of_range_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::current() )
inlineexplicit

Create a new instance of class index_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.

◆ index_out_of_range_exception() [6/10]

xtd::index_out_of_range_exception::index_out_of_range_exception ( const std::exception & inner_exception,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() )
inlineexplicit

Create a new instance of class index_out_of_range_exception.

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

◆ index_out_of_range_exception() [7/10]

xtd::index_out_of_range_exception::index_out_of_range_exception ( const xtd::string & message,
const std::exception & inner_exception,
const xtd::diagnostics::stack_frame & stack_frame = xtd::diagnostics::stack_frame::current() )
inlineexplicit

Create a new instance of class index_out_of_range_exception.

Parameters
messageMessage string associate to the exception.
inner_exceptionThe exception that is the cause of the current exception.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

◆ index_out_of_range_exception() [8/10]

xtd::index_out_of_range_exception::index_out_of_range_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::current() )
inlineexplicit

Create a new instance of class index_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.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

◆ index_out_of_range_exception() [9/10]

xtd::index_out_of_range_exception::index_out_of_range_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::current() )
inlineexplicit

Create a new instance of class index_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.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

◆ index_out_of_range_exception() [10/10]

xtd::index_out_of_range_exception::index_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 & stack_frame = xtd::diagnostics::stack_frame::current() )
inlineexplicit

Create a new instance of class index_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.
stack_frame(optional) Contains current stack frame about member name, file path and line number in the file where the exception is occurred. Typically xtd::diagnostics::stack_frame::current().

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