Share via


Error Handling

Use these routines to handle program errors.

Error-Handling Routines

Routine Use
assert macro Test for programming logic errors; available in both the release and debug versions of the run-time library
_ASSERT, _ASSERTE macros Similar to assert, but only available in the debug versions of the run-time library
clearerr Reset error indicator. Calling rewind or closing a stream also resets the error indicator.
_eof Check for end of file in low-level I/O
feof Test for end of file. End of file is also indicated when _read returns 0.
ferror Test for stream I/O errors
_RPT, _RPTF macros Generate a report similar to printf, but only available in the debug versions of the run-time library