Merge pull request #91 from cblichmann:main

PiperOrigin-RevId: 419577353
Change-Id: Iab4f1234533ec402cb3f60975393c5df14217231
This commit is contained in:
Copybara-Service 2022-01-04 06:14:53 -08:00
commit c3aa56ff37

View File

@ -97,7 +97,12 @@ class File {
}
~File() { fclose(stream_); }
void Check() { SAPI_RAW_PCHECK(!ferror(stream_), "I/O on %s", name_); }
void Check() {
if (ferror(stream_)) {
SAPI_RAW_PLOG(ERROR, "I/O on %s", name_);
_Exit(EXIT_FAILURE);
}
}
FILE* get() const { return stream_; }