Adding exceptions to Vertex and networks

Now, some errors of Vertex class trows an exeption