xtd 0.2.0
throw_helper.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../internal/__xtd_source_location.hpp"
6#include "../type.hpp"
7#include "exception_case.hpp"
8
10namespace xtd {
12 namespace net {
13 namespace sockets {
14 enum class socket_error;
15 }
16 }
18
20 namespace helpers {
36 public:
39 using source_location = __xtd_source_location__;
40
42 throw_helper() = delete;
44
47 [[noreturn]] static void throws(xtd::helpers::exception_case exception_case, const source_location& location = source_location::current());
51 [[noreturn]] static void throws(xtd::helpers::exception_case exception_case, const char* message, const source_location& location = source_location::current());
56 [[noreturn]] static void throws(xtd::helpers::exception_case exception_case, const xtd::type& type, const source_location& location = source_location::current());
61 [[noreturn]] static void throws(xtd::helpers::exception_case exception_case, const xtd::net::sockets::socket_error& error, const source_location& location = source_location::current());
62 };
63 }
64}
The xtd::helpers::throw_helper class is used to throw an exception in the xtd framework.
Definition throw_helper.hpp:35
__xtd_source_location__ source_location
Represents the internal source location type.
Definition throw_helper.hpp:39
Contains xtd::helpers::exception_case enum class.
exception_case
Represents the exception case used by the xtd::helpers::exception helper class.
Definition exception_case.hpp:25
std::type_info type
Stores information about a type.
Definition type.hpp:23
socket_error
Defines error codes for the xtd::net::sockets::socket class.
Definition socket_error.hpp:30
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10