File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
main/java/org/neo4j/driver/internal
test/java/org/neo4j/driver/internal Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 34
34
import org .neo4j .driver .v1 .Value ;
35
35
import org .neo4j .driver .v1 .Values ;
36
36
import org .neo4j .driver .v1 .exceptions .ClientException ;
37
+ import org .neo4j .driver .v1 .exceptions .ConnectionFailureException ;
37
38
import org .neo4j .driver .v1 .types .TypeSystem ;
38
39
39
40
import static org .neo4j .driver .v1 .Values .value ;
@@ -296,9 +297,9 @@ private void ensureConnectionIsOpen()
296
297
{
297
298
if ( !connection .isOpen () )
298
299
{
299
- throw new ClientException ( "The current session cannot be reused as the underlying connection with the " +
300
- "server has been closed due to unrecoverable errors. " +
301
- "Please close this session and retry your statement in another new session." );
300
+ throw new ConnectionFailureException ( "The current session cannot be reused as the underlying connection with the " +
301
+ "server has been closed due to unrecoverable errors. " +
302
+ "Please close this session and retry your statement in another new session." );
302
303
}
303
304
}
304
305
Original file line number Diff line number Diff line change 27
27
import org .neo4j .driver .v1 .Logger ;
28
28
import org .neo4j .driver .v1 .Transaction ;
29
29
import org .neo4j .driver .v1 .exceptions .ClientException ;
30
+ import org .neo4j .driver .v1 .exceptions .ConnectionFailureException ;
30
31
31
32
import static junit .framework .Assert .fail ;
32
33
import static junit .framework .TestCase .assertNotNull ;
@@ -121,7 +122,7 @@ public void shouldNotAllowMoreStatementsInSessionWhileConnectionClosed() throws
121
122
when ( mock .isOpen () ).thenReturn ( false );
122
123
123
124
// Expect
124
- exception .expect ( ClientException .class );
125
+ exception .expect ( ConnectionFailureException .class );
125
126
126
127
// When
127
128
sess .run ( "whatever" );
@@ -134,7 +135,7 @@ public void shouldNotAllowMoreTransactionsInSessionWhileConnectionClosed() throw
134
135
when ( mock .isOpen () ).thenReturn ( false );
135
136
136
137
// Expect
137
- exception .expect ( ClientException .class );
138
+ exception .expect ( ConnectionFailureException .class );
138
139
139
140
// When
140
141
sess .beginTransaction ();
You can’t perform that action at this time.
0 commit comments