By default, libfh will print any error and warning messages directly to ``stderr.'' You do not have to use any of these functions if that behavior is acceptable.
It is possible to define your own log handlers which the libfh will call with a single string constant argument whenever it has an error or warning to report. It is also possible to set all three to NULL using the functions below to suppress all log output.
Pass NULL to suppress warnings, or a pointer to your own function which should be called whenever the library has warning to report. Warnings are used to report illegal characters, values which had to be truncated, or invalid characters in FITS padding regions.
Pass NULL to suppress library errors, or a pointer to your own function which should be called whenever the library has an error (typically, and error code is returned in fh_result at the same time.) Error strings correspond roughly to the descriptions of the fh_result error codes, but may also contain additional information.
The default handler for this is the ANSI C call ``perror()''. If you install your own call, it should print the message passed, but also check the value of errno. This is used when a system call (such as open, close, read, write, fcntl) fails.