Added getErrors() method.