The MLeader object (and the equivalent AcDbMLeader in C++) support a block as the text component, as described at this previous blog post. One of the required steps is set the BlockPosition property (or setBlockPosition in C++), but this may throw eInvalidException.
In fact this exception is expected if the extents of the block cannot be defined, for instance, if there are invisible attributes defined on it.
To avoid this, simply set the MLeader points with AddLeaderLine and/or AddFirsVertex before setting the block data.