xtd 0.2.0
Loading...
Searching...
No Matches
invalid_operation_exception.h
Go to the documentation of this file.
1
4#pragma once
5#include "literals.h"
6#include "system_exception.h"
7
9namespace xtd {
20 public:
22
31 explicit invalid_operation_exception(const std::optional<xtd::string>& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
36 template<typename exception_t>
38
44 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame) and manually set the property xtd::exception::error_code - Will be removed in version 0.4.0.")]]
51 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame) and manually set the property xtd::exception::help_link - Will be removed in version 0.4.0.")]]
59 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame) and manually set the properties xtd::exception::error_code and xtd::exception::help_link - Will be removed in version 0.4.0.")]]
66 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) - Will be removed in version 0.4.0.")]]
73 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) - Will be removed in version 0.4.0.")]]
81 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) and manually set the property xtd::exception::error_code - Will be removed in version 0.4.0.")]]
82 invalid_operation_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());
89 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) and manually set the property xtd::exception::help_link - Will be removed in version 0.4.0.")]]
98 [[deprecated("Use xtd::invalid_operation_exception (const xtd::string& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) and manually set the properties xtd::exception::error_code and xtd::exception::help_link - Will be removed in version 0.4.0.")]]
99 invalid_operation_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());
101
104 invalid_operation_exception& operator =(const invalid_operation_exception&) = default;
106 };
107}
Represents text as a sequence of character units.
Definition basic_string.h:79
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:47
static stack_frame current(const xtd::source_location &value=xtd::source_location::current()) noexcept
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
virtual const std::error_code & error_code() const noexcept
Gets error associate to the exception.
virtual const xtd::string & message() const noexcept
Gets message associate to the exception.
virtual exception_ref inner_exception() const noexcept
Gets the exception instance that caused the current exception.
virtual const xtd::string & help_link() const noexcept
Gets a link to the help file associated with this exception.
static std::error_code make_error_code(int h_result) noexcept
Creates error code value for the specified HRESULT.
static constexpr int32 COR_E_INVALIDOPERATION
Operation is not valid due to the current state of the object.
Definition h_result.h:178
The exception that is thrown when the format of an argument does not meet the parameter specification...
Definition invalid_operation_exception.h:19
invalid_operation_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 invalid_operation_exception.
invalid_operation_exception(const std::optional< xtd::string > &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class invalid_operation_exception.
invalid_operation_exception(const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class invalid_operation_exception.
invalid_operation_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 invalid_operation_exception.
invalid_operation_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 invalid_operation_exception.
invalid_operation_exception(const std::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 invalid_operation_exception.
Definition invalid_operation_exception.h:37
invalid_operation_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 invalid_operation_exception.
invalid_operation_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 invalid_operation_exception.
invalid_operation_exception(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class invalid_operation_exception.
invalid_operation_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 invalid_operation_exception.
invalid_operation_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 invalid_operation_exception.
The exception that is thrown when a method call is invalid for the object's current state.
Definition system_exception.h:18
Contains xtd literals.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::system_exception exception.