More thorough exception throwing when loading an invalid graph.