package com.tinkerpop.blueprints.pgm.util;

/**
 * The ExceptionFactory provides standard exceptions that should be used by all Blueprints implementations.
 * This ensures that the look-and-feel of all implementations are the same in terms of terminology and punctuation.
 *
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class ExceptionFactory {

    // Graph related exceptions

    public static IllegalArgumentException vertexIdCanNotBeNull() {
        return new IllegalArgumentException("Vertex id can not be null");
    }

    public static IllegalArgumentException edgeIdCanNotBeNull() {
        return new IllegalArgumentException("Edge id can not be null");
    }

    public static IllegalArgumentException vertexWithIdAlreadyExists(final Object id) {
        return new IllegalArgumentException("Vertex with id already exists: " + id);
    }

    public static IllegalArgumentException edgeWithIdAlreadyExist(final Object id) {
        return new IllegalArgumentException("Edge with id already exists: " + id);
    }

    // Element related exceptions

    public static IllegalArgumentException propertyKeyIdIsReserved() {
        return new IllegalArgumentException("Property key id is reserved for all elements");
    }

    public static IllegalArgumentException propertyKeyLabelIsReservedForEdges() {
        return new IllegalArgumentException("Property key label is reserved for all edges");
    }

    // IndexableGraph related exceptions

    public static IllegalArgumentException indexAlreadyExists(final String indexName) {
        return new IllegalArgumentException("Index already exists: " + indexName);
    }

    public static IllegalStateException indexDoesNotSupportClass(final String indexName, final Class clazz) {
        return new IllegalStateException(indexName + " does not support class: " + clazz);
    }

    // KeyIndexableGraph related exceptions

    public static IllegalArgumentException classIsNotIndexable(final Class clazz) {
        return new IllegalArgumentException("Class is not indexable: " + clazz);
    }
}

@@ -1209,19 +1209,16 @@
 rty key 
-id 
 is reser
@@ -1237,16 +1237,20 @@
 elements
+: id
 %22);%0A    
@@ -1396,14 +1396,8 @@
 key 
-label 
 is r
@@ -1417,16 +1417,23 @@
 ll edges
+: label
 %22);%0A    

tweak to utility package structures. touches alot of classes.