lib/fmt/RuntimeError: new library

Replacing FormatRuntimeError().
This commit is contained in:
Max Kellermann
2022-11-28 21:58:21 +01:00
parent 45b13fc2a6
commit fa58db798b
105 changed files with 551 additions and 502 deletions

View File

@@ -19,6 +19,7 @@
#include "ServerSocket.hxx"
#include "lib/fmt/ExceptionFormatter.hxx"
#include "lib/fmt/RuntimeError.hxx"
#include "net/IPv4Address.hxx"
#include "net/IPv6Address.hxx"
#include "net/StaticSocketAddress.hxx"
@@ -31,7 +32,6 @@
#include "net/ToString.hxx"
#include "event/SocketEvent.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/RuntimeError.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
@@ -255,8 +255,8 @@ ServerSocket::Open()
const auto address_string = i.ToString();
try {
std::throw_with_nested(FormatRuntimeError("Failed to bind to '%s'",
address_string.c_str()));
std::throw_with_nested(FmtRuntimeError("Failed to bind to '{}'",
address_string));
} catch (...) {
last_error = std::current_exception();
}