made setErrors() public so this class can be useful in other packages/modules