mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Simplify format_error
This commit is contained in:
parent
3178bb9a26
commit
ac85afaab6
@ -961,13 +961,11 @@ FMT_API bool write_console(std::FILE* f, string_view text);
|
|||||||
FMT_API void print(std::FILE*, string_view);
|
FMT_API void print(std::FILE*, string_view);
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
/** A formatting error such as invalid format string. */
|
/** An error reported from a formatting function. */
|
||||||
FMT_CLASS_API
|
FMT_CLASS_API
|
||||||
class FMT_API format_error : public std::runtime_error {
|
class FMT_API format_error : public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
explicit format_error(const char* message) : std::runtime_error(message) {}
|
using std::runtime_error::runtime_error;
|
||||||
explicit format_error(const std::string& message)
|
|
||||||
: std::runtime_error(message) {}
|
|
||||||
format_error(const format_error&) = default;
|
format_error(const format_error&) = default;
|
||||||
format_error& operator=(const format_error&) = default;
|
format_error& operator=(const format_error&) = default;
|
||||||
format_error(format_error&&) = default;
|
format_error(format_error&&) = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user