You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-12-01 22:30:09 +02:00
Replace THROW_ON_SYS_ERROR() with THROW_SYS_ERROR().
The former macro was hiding missing branch coverage for critical error handling.
This commit is contained in:
@@ -339,9 +339,8 @@ cmdHelp()
|
||||
{
|
||||
String *help = helpRender();
|
||||
|
||||
THROW_ON_SYS_ERROR(
|
||||
write(STDOUT_FILENO, strPtr(help), strSize(help)) != (int)strSize(help), FileWriteError,
|
||||
"unable to write help to stdout");
|
||||
if (write(STDOUT_FILENO, strPtr(help), strSize(help)) != (int)strSize(help)) // {uncovered - write does not fail}
|
||||
THROW_SYS_ERROR(FileWriteError, "unable to write help to stdout"); // {uncovered+}
|
||||
}
|
||||
MEM_CONTEXT_TEMP_END();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user