xtd 0.2.0
Loading...
Searching...
No Matches
file_format_exception.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../format_exception.hpp"
6#include "../literals.hpp"
7
9namespace xtd {
11 namespace io {
31 public:
33
42 explicit file_format_exception(const std::optional<xtd::string>& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
47 template<typename exception_t>
48 file_format_exception(const std::optional<xtd::string>& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current()) : xtd::format_exception(std::optional<xtd::string> {message.value_or(default_message())}, inner_exception, stack_frame) {error_code(h_result::make_error_code(h_result::COR_E_FORMAT));}
49
55 [[deprecated("Use xtd::file_format_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.")]]
62 [[deprecated("Use xtd::file_format_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.")]]
70 [[deprecated("Use xtd::file_format_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.")]]
77 [[deprecated("Use xtd::file_format_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.")]]
84 [[deprecated("Use xtd::file_format_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.")]]
92 [[deprecated("Use xtd::file_format_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.")]]
93 file_format_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());
100 [[deprecated("Use xtd::file_format_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.")]]
109 [[deprecated("Use xtd::file_format_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.")]]
110 file_format_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());
112
115 file_format_exception& operator =(const file_format_exception&) = default;
117 private:
118 static xtd::string default_message() noexcept;
119 };
120 }
121}
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp: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.
The exception that is thrown when the format of an argument does not meet the parameter specification...
Definition format_exception.hpp:19
static std::error_code make_error_code(int h_result) noexcept
Creates error code value for the specified HRESULT.
static constexpr int32 COR_E_FORMAT
One of the identified items was in an invalid format.
Definition h_result.hpp:162
The exception that is thrown when the format of an argument does not meet the parameter specification...
Definition file_format_exception.hpp:30
file_format_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 file_format_exception.
file_format_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 file_format_exception.
file_format_exception(const std::exception &inner_exception, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class file_format_exception.
file_format_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 file_format_exception.
file_format_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 file_format_exception.
file_format_exception(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class file_format_exception.
file_format_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 file_format_exception.
Definition file_format_exception.hpp:48
file_format_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 file_format_exception.
file_format_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 file_format_exception.
file_format_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 file_format_exception.
file_format_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 file_format_exception.
std::optional< type_t > optional
Represents the null_opt alias on std::nullopt_t.
Definition optional.hpp:181
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10