mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-01 11:44:46 +02:00
posix.cc: Fix compilation with -fno-exceptions
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
This commit is contained in:
committed by
Victor Zverovich
parent
24d66c5d65
commit
7d2723d57c
@@ -180,8 +180,8 @@ void fmt::File::dup2(int fd) {
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
|
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
throw system_error(errno,
|
FMT_THROW(system_error(errno,
|
||||||
"cannot duplicate file descriptor {} to {}", fd_, fd);
|
"cannot duplicate file descriptor {} to {}", fd_, fd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user