Put in string exception case in addEdge