Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Exception matching for pre-1.8 Neo4j.

  • Loading branch information...
commit cc803ebc5786844b796b4b530b8f81ee9b95d9bf 1 parent c2bbbff
@rdvdijk rdvdijk authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 lib/neography/connection.rb
View
15 lib/neography/connection.rb
@@ -114,13 +114,14 @@ def handle_4xx_response(code, body)
case code
when 400, 404
case parsed_body["exception"]
- when "SyntaxException" ; raise SyntaxException.new(message, code, stacktrace)
- when "PropertyValueException" ; raise PropertyValueException.new(message, code, stacktrace)
- when "BadInputException" ; raise BadInputException.new(message, code, stacktrace)
- when "NodeNotFoundException" ; raise NodeNotFoundException.new(message, code, stacktrace)
- when "NoSuchPropertyException" ; raise NoSuchPropertyException.new(message, code, stacktrace)
- when "RelationshipNotFoundException" ; raise RelationshipNotFoundException.new(message, code, stacktrace)
- when "NotFoundException" ; raise NotFoundException.new(message, code, stacktrace)
+ when /SyntaxException/ ; raise SyntaxException.new(message, code, stacktrace)
+ when /this is not a query/ ; raise SyntaxException.new(message, code, stacktrace)
+ when /PropertyValueException/ ; raise PropertyValueException.new(message, code, stacktrace)
+ when /BadInputException/ ; raise BadInputException.new(message, code, stacktrace)
+ when /NodeNotFoundException/ ; raise NodeNotFoundException.new(message, code, stacktrace)
+ when /NoSuchPropertyException/ ; raise NoSuchPropertyException.new(message, code, stacktrace)
+ when /RelationshipNotFoundException/ ; raise RelationshipNotFoundException.new(message, code, stacktrace)
+ when /NotFoundException/ ; raise NotFoundException.new(message, code, stacktrace)
else
raise NeographyError.new(message, code, stacktrace)
end
Please sign in to comment.
Something went wrong with that request. Please try again.