exception for disconnected graphs & digraphs added

exception used in eccentricity function of distance_measure modules.