posix.cc: Fix compilation with -fno-exceptions

Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
This commit is contained in:
Andrew Gunnerson
2018-02-15 18:39:36 -08:00
committed by Victor Zverovich
parent 24d66c5d65
commit 7d2723d57c
+2 -2
View File
@@ -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));
}
}