xtd 0.2.0
Loading...
Searching...
No Matches
xtd::collections::key_not_found_exception Class Reference
Inheritance diagram for xtd::collections::key_not_found_exception:
xtd::system_exception xtd::object

Definition

The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.

The exception that is thrown when the key specified for accessing an element in a collection does not...
Definition key_not_found_exception.h:29
Defines the base class for predefined exceptions in the xtd namespace.
Definition system_exception.h:24
Inheritance
xtd::system_exceptionxtd::collections::key_not_found_exception
Header
#include <xtd/collections/key_not_found_exception>
Namespace
xtd::collections
Library
xtd.core
Examples
The following example demonstrates how to throw and catch an key_not_found_exception.

Public Constructors

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

Additional Inherited Members

- Public Types inherited from xtd::system_exception
using exception_ref = std::optional< std::reference_wrapper< const std::exception > >
 Optional reference wrapper on std::exception.
 
- Public Member Functions inherited from xtd::system_exception
 system_exception (const xtd::diagnostics::stack_frame &information=xtd::diagnostics::stack_frame::empty())
 Create a new instance of class system_exception.
 
 system_exception (const xtd::string &message, const xtd::diagnostics::stack_frame &information=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::diagnostics::stack_frame &information=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 &information=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 &information=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 &information=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 &information=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 &information=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 &information=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 &information=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 const xtd::stringhelp_link () const noexcept
 Gets a link to the help file associated with this exception.
 
virtual std::error_code error_code () const noexcept
 Gets error associate to the exception.
 
virtual exception_ref inner_exception () const noexcept
 Gets the exception instance that caused the current exception.
 
virtual uint32 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::stringmessage () const noexcept
 Gets message associate to the exception.
 
virtual const xtd::stringname () const noexcept
 Gets full class name the exception.
 
virtual xtd::string stack_trace () const noexcept
 Gets a string representation of the immediate frames on the call stack.
 
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::system_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.
 

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