lib/neoon/error.rb in neoon-0.0.4 vs lib/neoon/error.rb in neoon-0.0.5

- old
+ new

@@ -1,11 +1,27 @@ module Neoon module Error - class Exception < StandardError; end + class Exception < StandardError + attr_reader :response + + def initialize(response, message) + @response = response + super(message) + end + end + class IndexException < Exception; end class SchemaException < Exception; end class CypherException < Exception; end + + # custom + class NodeNotFoundException < Exception; end + + # org.neo4j.kernel.impl.api.constraints + class ConstraintValidationKernelException < Exception; end + class UnableToValidateConstraintKernelException < Exception; end + class UniqueConstraintViolationKernelException < Exception; end # org.neo4j.kernel.api.exceptions class BeginTransactionFailureException < Exception; end class ConstraintCreationException < Exception; end class EntityNotFoundException < Exception; end