xtd 0.2.0
xtd::forms::exception_box Class Referencefinal

Definition

Represents a common dialog box that displays exception box.

Header
#include <xtd/forms/exception_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
dialog_exception_dialog_w.png
    html dialog_exception_dialog_m.png    html dialog_exception_dialog_g.png 
Dark  
dialog_exception_dialog_wd.png
    html dialog_exception_dialog_md.png    html dialog_exception_dialog_gd.png 
Examples
The following code example demonstrates the use of exception_box dialog.
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/exception_box>
#include <xtd/forms/form>
#include <xtd/invalid_operation_exception>
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Exception box example");
controls().push_back(button1);
button1.location({10, 10});
button1.auto_size(true);
button1.text("Exception...");
button1.click += [&] {
try {
throw invalid_operation_exception("Throws an invalid operation exception to show an exception dialog.", current_stack_frame_);
} catch (const xtd::system_exception& e) {
}
};
}
private:
};
auto main()->int {
application::run(form1 {});
}

Methods

static dialog_result show (const iwin32_window &owner)
 Displays a exception box in front of the specified window. The exception box displays an unknown exception. More...
 
static dialog_result show (const iwin32_window &owner, const xtd::ustring &caption)
 Displays a exception box in front of the specified window. The exception box displays a specified caption and unknown exception. More...
 
static dialog_result show (const iwin32_window &owner, const std::exception &exception)
 Displays a exception box in front of the specified window. The exception box displays a specified exception. More...
 
static dialog_result show (const iwin32_window &owner, const std::exception &exception, const xtd::ustring &caption)
 Displays a exception box in front of the specified window. The exception box displays a specified exception and caption. More...
 
static dialog_result show ()
 Displays a exception box. The exception box displays an unknown exception. More...
 
static dialog_result show (const xtd::ustring &caption)
 Displays a exception box. The exception box displays a specified caption and unknown exception. More...
 
static dialog_result show (const std::exception &exception)
 Displays a exception box. The exception box displays a specified exception. More...
 
static dialog_result show (const std::exception &exception, const xtd::ustring &caption)
 Displays a exception box. The exception box displays a specified exception and caption. More...
 

Member Function Documentation

◆ show() [1/8]

static dialog_result xtd::forms::exception_box::show ( const iwin32_window owner)
static

Displays a exception box in front of the specified window. The exception box displays an unknown exception.

Parameters
ownerA iwin32_window that represents the owner window of the busy box.

◆ show() [2/8]

static dialog_result xtd::forms::exception_box::show ( const iwin32_window owner,
const xtd::ustring caption 
)
static

Displays a exception box in front of the specified window. The exception box displays a specified caption and unknown exception.

Parameters
ownerA iwin32_window that represents the owner window of the busy box.
captionA string that specifies the title bar caption to display.

◆ show() [3/8]

static dialog_result xtd::forms::exception_box::show ( const iwin32_window owner,
const std::exception &  exception 
)
static

Displays a exception box in front of the specified window. The exception box displays a specified exception.

Parameters
ownerA iwin32_window that represents the owner window of the busy box.
exceptionAn exception to display.

◆ show() [4/8]

static dialog_result xtd::forms::exception_box::show ( const iwin32_window owner,
const std::exception &  exception,
const xtd::ustring caption 
)
static

Displays a exception box in front of the specified window. The exception box displays a specified exception and caption.

Parameters
ownerA iwin32_window that represents the owner window of the busy box.
exceptionAn exception to display.
captionA string that specifies the title bar caption to display.

◆ show() [5/8]

static dialog_result xtd::forms::exception_box::show ( )
static

Displays a exception box. The exception box displays an unknown exception.

Examples:
exception_box.cpp.

◆ show() [6/8]

static dialog_result xtd::forms::exception_box::show ( const xtd::ustring caption)
static

Displays a exception box. The exception box displays a specified caption and unknown exception.

Parameters
captionA string that specifies the title bar caption to display.

◆ show() [7/8]

static dialog_result xtd::forms::exception_box::show ( const std::exception &  exception)
static

Displays a exception box. The exception box displays a specified exception.

Parameters
exceptionAn exception to display.

◆ show() [8/8]

static dialog_result xtd::forms::exception_box::show ( const std::exception &  exception,
const xtd::ustring caption 
)
static

Displays a exception box. The exception box displays a specified exception and caption.

Parameters
exceptionAn exception to display.
captionA string that specifies the title bar caption to display.

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