Change ErrorDomain to extern.