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 3434import org .neo4j .driver .v1 .Value ;
3535import org .neo4j .driver .v1 .Values ;
3636import org .neo4j .driver .v1 .exceptions .ClientException ;
37+ import org .neo4j .driver .v1 .exceptions .ConnectionFailureException ;
3738import org .neo4j .driver .v1 .types .TypeSystem ;
3839
3940import static org .neo4j .driver .v1 .Values .value ;
@@ -296,9 +297,9 @@ private void ensureConnectionIsOpen()
296297 {
297298 if ( !connection .isOpen () )
298299 {
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." );
302303 }
303304 }
304305
Original file line number Diff line number Diff line change 2727import org .neo4j .driver .v1 .Logger ;
2828import org .neo4j .driver .v1 .Transaction ;
2929import org .neo4j .driver .v1 .exceptions .ClientException ;
30+ import org .neo4j .driver .v1 .exceptions .ConnectionFailureException ;
3031
3132import static junit .framework .Assert .fail ;
3233import static junit .framework .TestCase .assertNotNull ;
@@ -121,7 +122,7 @@ public void shouldNotAllowMoreStatementsInSessionWhileConnectionClosed() throws
121122 when ( mock .isOpen () ).thenReturn ( false );
122123
123124 // Expect
124- exception .expect ( ClientException .class );
125+ exception .expect ( ConnectionFailureException .class );
125126
126127 // When
127128 sess .run ( "whatever" );
@@ -134,7 +135,7 @@ public void shouldNotAllowMoreTransactionsInSessionWhileConnectionClosed() throw
134135 when ( mock .isOpen () ).thenReturn ( false );
135136
136137 // Expect
137- exception .expect ( ClientException .class );
138+ exception .expect ( ConnectionFailureException .class );
138139
139140 // When
140141 sess .beginTransaction ();
You can’t perform that action at this time.
0 commit comments