update wording in the error inside arg_id_handler, use FMT_ASSERT instead of throw

This commit is contained in:
Alexey Ochapov 2021-02-16 08:01:11 +03:00
parent 8b023e8945
commit ba883992b4
No known key found for this signature in database
GPG Key ID: 9DC52E8F031B8DA8

View File

@ -589,7 +589,7 @@ template <typename Char> struct arg_id_handler {
constexpr void on_error(const char* message) { throw format_error(message); } constexpr void on_error(const char* message) { throw format_error(message); }
constexpr int on_arg_id() { constexpr int on_arg_id() {
throw format_error("handler cannot be used for empty arg_id"); FMT_ASSERT(false, "handler cannot be used with automatic indexing");
return 0; return 0;
} }