By convention, a function that indicates failure *MUST* set an error. Also, an error can only be set once.