...
- Source code size is inflated, though not by as much as other approaches.
- All error indicators must be checked after calling functions.
- Nesting function calls that all use this mechanism is problematic.
- Functions that fail must make sure the free any locally allocated resources.
- In general, combining registries of different sets of errors is difficult. For example, changing the above code to use
errno
is difficult and bug-prone; as one must be precisely aware of when C library functions set and clearerrno
, and one must be aware of all validerrno
values before adding new ones.
...