From 7d2723d57c07affc86e5cf0aa85e70e2306f8b40 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Thu, 15 Feb 2018 20:26:24 -0500 Subject: [PATCH] posix.cc: Fix compilation with -fno-exceptions Signed-off-by: Andrew Gunnerson --- include/fmt/posix.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/posix.cc b/include/fmt/posix.cc index a7a255ac..67513b07 100644 --- a/include/fmt/posix.cc +++ b/include/fmt/posix.cc @@ -180,8 +180,8 @@ void fmt::File::dup2(int fd) { int result = 0; FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd))); if (result == -1) { - throw system_error(errno, - "cannot duplicate file descriptor {} to {}", fd_, fd); + FMT_THROW(system_error(errno, + "cannot duplicate file descriptor {} to {}", fd_, fd)); } }