neo4j-java-driver 4.1.0.beta.1-java → 4.1.0.beta.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5631416868ef0ee4e31eee3ebe51534110c0dc8edf012121d0555662141fd79a
4
- data.tar.gz: 9d2703ce1ccb0ac139589582b26c274b5a4985cd01e160634e45b9a058600205
3
+ metadata.gz: 828896723fbab7c465973c3809166bba8d472faa408dcbcd6b7b5eecf8b57b1c
4
+ data.tar.gz: ded0e916567c3374388ed3b1021b0e8ee81a30efcc2e8e98e89b3ae0c79c85fe
5
5
  SHA512:
6
- metadata.gz: b0003aa8a1bf14b9d7daca164c9cb1ce79fecb7d354495123a5bd3dc1f75c266707e8617c652f5df3b6294b4ce79415cce71c2d57e7cb099eef91d68ca32de64
7
- data.tar.gz: 166d16d61082ad1c8997c6f50c0d72c25ac23cbd1a495c1d175f0061e992fe44b75b96ef80788c3f7d1fc89221f52f3cc4cb04c0107550f9840ba29d4056d6e2
6
+ metadata.gz: 7ce6018b659820388be9dd2c80bccb6e8cfc5de323f11f005e99ff2827db9bef998508b81dc7a1858e181e792b55d5c4d40cfa06c5c7921a5c6e8efadd463e3f
7
+ data.tar.gz: c7473b8f3519972cf851572a31a42188c393130bcea86bccb3c915e98bcab885437792b899db2e1f0ffe4210d62b544adabb377c0f1dc51ac95c665e64d61374
@@ -20,8 +20,19 @@ module Neo4j
20
20
 
21
21
  def reverse_check
22
22
  yield
23
- rescue StandardError => e
24
- raise(e.cause || ExceptionMapper.reverse_exception_class(e)&.new('') || e)
23
+ rescue Neo4j::Driver::Exceptions::ServiceUnavailableException => e
24
+ raise(throwable(e.cause) || Java::OrgNeo4jDriverExceptions::ServiceUnavailableException.new(e.message))
25
+ rescue Neo4j::Driver::Exceptions::Neo4jException,
26
+ Neo4j::Driver::Exceptions::NoSuchRecordException,
27
+ Neo4j::Driver::Exceptions::UntrustedServerException,
28
+ Neo4j::Driver::Exceptions::IllegalStateException => e
29
+ raise(throwable(e.cause) || e)
30
+ end
31
+
32
+ private
33
+
34
+ def throwable(e)
35
+ e if e.is_a? Java::JavaLang::Throwable
25
36
  end
26
37
  end
27
38
  end
@@ -24,14 +24,7 @@ module Neo4j
24
24
  end
25
25
 
26
26
  def arguments
27
- [code, message, self, suppressed.map(&method(:mapped_exception))]
28
- end
29
-
30
- def self.reverse_exception_class(exception)
31
- case exception
32
- when Neo4j::Driver::Exceptions::ServiceUnavailableException
33
- ServiceUnavailableException
34
- end
27
+ [code, message, suppressed.map(&method(:mapped_exception))]
35
28
  end
36
29
 
37
30
  private
@@ -4,12 +4,11 @@ module Neo4j
4
4
  module Driver
5
5
  module Exceptions
6
6
  class Neo4jException < RuntimeError
7
- attr_reader :code, :cause, :suppressed
7
+ attr_reader :code, :suppressed
8
8
 
9
9
  def initialize(*args)
10
10
  @code = args.shift if args.count > 1
11
11
  message = args.shift
12
- @cause = args.shift
13
12
  @suppressed = args.shift
14
13
  super(message)
15
14
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '4.1.0.beta.1'
5
+ VERSION = '4.1.0.beta.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-java-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0.beta.1
4
+ version: 4.1.0.beta.2
5
5
  platform: java
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-16 00:00:00.000000000 Z
11
+ date: 2020-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement