moved error domain decleration into public headers