15#include <system_error>
18struct __xtd_exception_gui__;
19auto __xtd_load_exception_gui__() -> void;
58 template<
typename exception_t>
74 [[nodiscard]]
virtual auto help_link() const noexcept -> const
xtd::
string&;
99 [[nodiscard]] virtual auto
message() const noexcept -> const
xtd::
string&;
104 [[nodiscard]] virtual auto
source() const noexcept -> const
xtd::
string&;
108 virtual auto
source(const
xtd::
string& value) noexcept ->
void;
127 [[nodiscard]] auto
what() const noexcept -> const
char* override;
144 load_exception_gui();
145 return show_exception_(
e);
150 load_exception_gui();
151 return show_exception_();
156 friend struct ::__xtd_exception_gui__;
158 [[nodiscard]]
auto stack_trace_to_string() const noexcept ->
xtd::
string;
160 [[nodiscard]] auto get_name() const noexcept -> const
xtd::
string&;
161 static auto load_exception_gui() ->
void {
162#if __XTD_CURRENT_TARGET_ID__ == __XTD_TARGET_ID_GUI_APPLICATION__ || __XTD_CURRENT_TARGET_ID__ == __XTD_TARGET_ID_UNKNOWN__
163 __xtd_load_exception_gui__();
166 static auto show_exception_(
const std::exception& e) ->
xtd::int32;
171 static bool enable_stack_trace_;
172 static xtd::intptr show_exception_gui_with_exception;
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:46
static auto current(const xtd::diagnostics::source_location &value=xtd::diagnostics::source_location::current()) noexcept -> xtd::diagnostics::stack_frame
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
Defines the base class for predefined exceptions in the xtd namespace.
Definition exception.hpp:34
virtual auto get_last_stack_frame() const noexcept -> const xtd::diagnostics::stack_frame &
Gets the last stack frame where the exception occurred.
virtual auto source() const noexcept -> const xtd::string &
Gets the name of the application or the object that causes the error.
static auto show_exception() -> xtd::int32
Shows unspecified exception with xtd::forms::exception_dialog or xtd::console.
Definition exception.hpp:149
auto to_string() const noexcept -> xtd::string override
Returns a string that represents the current exception.
static auto enable_stack_trace() noexcept -> bool
Gets if the generation of the stack trace is enabled.
static auto show_exception(const std::exception &e) -> xtd::int32
Shows speciefied exception with xtd::forms::exception_dialog or xtd::console.
Definition exception.hpp:143
exception(const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Create a new instance of class exception.
virtual auto stack_trace() const noexcept -> xtd::string
Gets a string representation of the immediate frames on the call stack.
virtual auto inner_exception() const noexcept -> exception_ref
Gets the exception instance that caused the current exception.
auto what() const noexcept -> const char *override
Gets message associate to the 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.
virtual auto help_link() const noexcept -> const xtd::string &
Gets a link to the help file associated with this exception.
virtual auto message() const noexcept -> const xtd::string &
Gets message associate to the exception.
virtual auto error_code() const noexcept -> const std::error_code &
Gets error associate to the exception.
virtual auto h_result() const noexcept -> xtd::int32
Gets HRESULT, a coded numerical value that is assigned to a specific exception.
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.
Definition exception.hpp:59
xtd::optional< xtd::ref< const xtd::exception > > exception_ref
Optional reference wrapper on std::exception.
Definition exception.hpp:40
auto memberwise_clone() const -> xtd::unique_ptr_object< object_t >
Creates a shallow copy of the current object.
object()=default
Create a new instance of the ultimate base class object.
The exception that is thrown when a method call is invalid for the object's current state.
Definition system_exception.hpp:18
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
std::optional< type_t > optional
Represents the optional alias on std::optional.
Definition optional.hpp:26
@ e
The E key.
Definition console_key.hpp:96
Contains xtd::h_result class.
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::nullopt valiue.
Contains xtd::object class.
Contains xtd::optional type.
Contains xtd::diagnostics::stack_frame class.
Contains xtd::string alias.