Throw correct exceptions on illegal operations related to XG transactions