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 20:26:24 -05:00 committed by Victor Zverovich
parent 24d66c5d65
commit 7d2723d57c

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));
}
}