Define an array of errors based on a specification.