xtd 0.2.0
xtd::helpers::throw_helper Class Reference

Definition

The xtd::helpers::throw_helper class is used to throw an exception in the xtd framework.

Definition
The xtd::helpers::throw_helper class is used to throw an exception in the xtd framework.
Definition throw_helper.hpp:35
Header
#include <xtd/helpers/throw_helper>
Namespace
xtd
Library
xtd.core

Public Types

using source_location = __xtd_source_location__
 Represents the internal source location type.
 

Static Public Member Functions

static void throws (xtd::helpers::exception_case exception_case, const source_location &location=source_location::current())
 Throws an exption with specified exception case.
 
static void throws (xtd::helpers::exception_case exception_case, const char *message, const source_location &location=source_location::current())
 Throws an exption with specified exception case, and message.
 
static void throws (xtd::helpers::exception_case exception_case, const xtd::type &type, const source_location &location=source_location::current())
 Throws an exption with specified exception case, and message.
 
static void throws (xtd::helpers::exception_case exception_case, const xtd::net::sockets::socket_error &error, const source_location &location=source_location::current())
 Throws an exption with specified exception case, and message.
 

Member Typedef Documentation

◆ source_location

using xtd::helpers::throw_helper::source_location = __xtd_source_location__

Represents the internal source location type.

Warning
Internal use only

Member Function Documentation

◆ throws() [1/4]

static void xtd::helpers::throw_helper::throws ( xtd::helpers::exception_case  exception_case,
const source_location location = source_location::current() 
)
static

Throws an exption with specified exception case.

Parameters
exception_caseOne of xtd::helpers::exception_case values.

◆ throws() [2/4]

static void xtd::helpers::throw_helper::throws ( xtd::helpers::exception_case  exception_case,
const char *  message,
const source_location location = source_location::current() 
)
static

Throws an exption with specified exception case, and message.

Parameters
exception_caseOne of xtd::helpers::exception_case values.
messageThe message associate to the exception.

◆ throws() [3/4]

static void xtd::helpers::throw_helper::throws ( xtd::helpers::exception_case  exception_case,
const xtd::type type,
const source_location location = source_location::current() 
)
static

Throws an exption with specified exception case, and message.

Parameters
exception_caseThe xtd::helpers::exception_case::format_not_iformatable value.
typeThe type associate to the exception.
Remarks
This overload can only be used with the xtd::helpers::exception_case::format_not_iformatable value.

◆ throws() [4/4]

static void xtd::helpers::throw_helper::throws ( xtd::helpers::exception_case  exception_case,
const xtd::net::sockets::socket_error error,
const source_location location = source_location::current() 
)
static

Throws an exption with specified exception case, and message.

Parameters
exception_caseThe xtd::helpers::exception_case::format_not_iformatable value.
typeThe type associate to the exception.
Remarks
This overload can only be used with the xtd::helpers::exception_case::socket value.

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