(simulator) Return a code corresponding to number of errors encoutered