next up previous contents index
Next: 4.6 Strings and Names Up: 4 The Operating Environment Previous: 4.4 Standard Options

4.5 Error Reporting

 

The HSHELL module provides a standard mechanism for reporting errors  and warnings . A typical error message is as follows

    HList: ERROR [+1110]
      IsWave: cannot open file speech.dat
This indicates that the tool HLIST is reporting an error number +1110. All errors have positive error numbers  and always result in the tool terminating. Warnings have negative error numbers and the tool does not terminate. The first two digits of an error number indicate the module or tool in which the error is located (HLIST in this case) and the last two digits define the class of error. The second line of the error message names the actual routine in which the error occurred (here IsWave) and the actual error message. All errors and warnings are listed in the reference section at the end of this book indexed by error/warning number. This listing contains more details on each error or warning along with suggested causes.

Error messages are sent to the standard error stream but warnings are sent to the standard output stream. The reason for the latter is that most HTK tools are run with progress tracing enabled. Sending warnings to the standard output stream ensures that they are properly interleaved with the trace of progress so that it is easy to determine the point at which the warning was issued. Sending warnings to standard error would lose this information.

The default behaviour of a HTK tool on terminating due to an error is to exit normally returning the error number as exit status. If, however, the configuration variable ABORTONERR  is set true, then the tool will core dump. This is a debugging facility which should not concern most users. 


next up previous contents index
Next: 4.6 Strings and Names Up: 4 The Operating Environment Previous: 4.4 Standard Options

ECRL HTK_V2.1: email [email protected]