Error handling
Error handling
Error numbers
Defined in header <errno.h>
|
|
---|---|
macro which expands to POSIX-compatible thread-local error number variable (macro variable) | |
macros for standard POSIX-compatible error conditions (macro constant) |
Assertions
Defined in header <assert.h>
|
|
---|---|
aborts the program if the user-specified condition is not true . May be disabled for release builds(function macro) | |
(C11) |
issues a compile-time diagnostic if the value of a constant expression is false (keyword macro) |
Bounds checkingThe standard library provides bounds-checked versions of some existing functions (
Note: implementations of bounds-checked functions are available as open-source libraries Safe C and Slibc, and as part of Watcom C. There is also an incompatible set of bounds-checked functions available in Visual Studio. |
(since C11) |
References
C11 standard (ISO/IEC 9899:2011):
- 7.2 Diagnostics (p: 186-187)
- 7.5 Errors (p: 205)
- 7.19 Common definitions (p: 288)
- 7.20 Integer types (p: 289-295)
- 7.21 Input/output (p: 296-339)
- 7.22 General utilities (p: 340-360)
- K.3.1.3 Use of errno (p: 584)
- K.3.2/2 errno_t (p: 585)
- K.3.3/2 rsize_t (p: 585)
- K.3.4/2 RSIZE_MAX (p: 585)
- 7.31.3 Errors (p: 455)
- 7.31.10 Integer types (p: 456)
- 7.31.11 Input/output (p: 456)
- 7.31.12 General utilities (p: 456)
C99 standard (ISO/IEC 9899:1999):
- 7.2 Diagnostics (p: 169)
- 7.5 Errors (p: 186)
- 7.26.3 Errors (p: 401)
- 7.26.8 Integer types (p: 401)
- 7.26.9 Input/output (p: 402)
- 7.26.10 General utilities (p: 402)
C89/C90 standard (ISO/IEC 9899:1990):
- 4.2 DIAGNOSTICS
- 4.1.3 Errors
- 4.13.1 Errors
- 4.13.6 Input/output
- 4.13.7 General utilities
See also
(C99)(C99)(C99) |
defines the error handling mechanism used by the common mathematical functions (macro constant) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/c/error