Error Handling
Whenever an error occurs in one of the functions
making up the iscloc program a message is written to the global string
variable errstr, which is declared in iscloc.h. The function then
returns with non zero status so that the calling function knows that there
is a problem. In most cases it will call function handle_error , printing the message to output stream errfile , which is assigned in config.txt
. In other cases it passes the status back another level to the function
that it was called by after possibly using function add_to_error to concatenate further information to errstr. The final error message will still be displayed using function handle_error , usually called by main.