Test cases can pass, even though an error has occurred, because they used their own error handler and did not specify to log the error. If you want to handle errors locally and generate an error (that is, log an error in the results file), you can do any of the following:
Writes string to the results file as an error (displays in red or italics, depending on platform) and increments the error counter.
This function is called automatically if you don’t handle the error yourself.
cmd-line is an optional string expression that contains a command line.