C LanguageError handling


Syntax

  • #include <errno.h>
  • int errno; /* implementation defined */
  • #include <string.h>
  • char *strerror(int errnum);
  • #include <stdio.h>
  • void perror(const char *s);

Remarks

Have in mind that errno is not necessarily a variable but that the syntax is only an indication how it might been declared. On many modern systems with thread interfaces errno is some macro that resolves to an object that is local to the current thread.