Adds the listener to the collection of listeners who will be notified when the
graph is modified, by sending it one of the messages defined in interface.
The exception thrown if an error occurs during read/write operations, if the data
or the file structure is wrong, but if the file is acceptable for the reader.