Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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 clear errno, and one must be aware of all valid errno values before adding new ones.

...