HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
exception.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#include <format>
6#include <exception>
7#include <string_view>
8
9#pragma once
10
11namespace tt {
12
27public:
29
30 template<typename FirstArg, typename... Args>
31 parse_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
32 parse_error(std::format(fmt, arg1, args...)) {}
33};
34
43public:
45
46 template<typename FirstArg, typename... Args>
47 operation_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
48 operation_error(std::format(fmt, arg1, args...))
49 {
50 }
51};
52
61public:
63
64 template<typename FirstArg, typename... Args>
65 io_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
66 io_error(std::format(fmt, arg1, args...))
67 {
68 }
69};
70
78public:
80
81 template<typename FirstArg, typename... Args>
82 os_error(std::string_view fmt, FirstArg const &arg1, Args const &...args) noexcept : os_error(std::format(fmt, arg1, args...))
83 {
84 }
85};
86
88public:
90
91 template<typename FirstArg, typename... Args>
92 gui_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
93 gui_error(std::format(fmt, arg1, args...))
94 {
95 }
96};
97
99public:
101
102 template<typename FirstArg, typename... Args>
103 key_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
104 key_error(std::format(fmt, arg1, args...))
105 {
106 }
107};
108
110public:
112
113 template<typename FirstArg, typename... Args>
114 url_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
115 url_error(std::format(fmt, arg1, args...))
116 {
117 }
118};
119
125public:
127
128 template<typename FirstArg, typename... Args>
129 cancel_error(std::string_view fmt, FirstArg const &arg1, Args const &...args) noexcept :
130 cancel_error(std::format(fmt, arg1, args...))
131 {
132 }
133};
134
135}
136
Exception thrown during parsing on an error.
Definition exception.hpp:26
Exception thrown during execution of a dynamic operation.
Definition exception.hpp:42
Exception thrown during I/O on an error.
Definition exception.hpp:60
Exception thrown during an operating system call.
Definition exception.hpp:77
Definition exception.hpp:87
Definition exception.hpp:98
Definition exception.hpp:109
Cancel error is caused by user pressing cancel.
Definition exception.hpp:124