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 "fmt/format.h"
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(fmt::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(fmt::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(fmt::format(fmt, arg1, args...))
67 {
68 }
69};
70
72public:
74
75 template<typename FirstArg, typename... Args>
76 gui_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
77 gui_error(fmt::format(fmt, arg1, args...))
78 {
79 }
80};
81
83public:
85
86 template<typename FirstArg, typename... Args>
87 key_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
88 key_error(fmt::format(fmt, arg1, args...))
89 {
90 }
91};
92
94public:
96
97 template<typename FirstArg, typename... Args>
98 url_error(std::string_view fmt, FirstArg const &arg1, Args const &... args) noexcept :
99 url_error(fmt::format(fmt, arg1, args...))
100 {
101 }
102};
103
109public:
111
112 template<typename FirstArg, typename... Args>
113 cancel_error(std::string_view fmt, FirstArg const &arg1, Args const &...args) noexcept :
114 url_error(fmt::format(fmt, arg1, args...))
115 {
116 }
117};
118
119}
120
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
Definition exception.hpp:71
Definition exception.hpp:82
Definition exception.hpp:93
Cancel error is caused by user pressing cancel.
Definition exception.hpp:108