From 6773b1e519992331710c427e638a182000c98d7a Mon Sep 17 00:00:00 2001 From: Martin Vahlensieck Date: Wed, 27 Mar 2024 11:06:36 +0100 Subject: [PATCH] Do not close connection on error This default is somewhat better suited for the implementation of interactive shells. --- .../main/java/org/polypheny/db/languages/LanguageManager.java | 2 +- .../main/java/org/polypheny/db/protointerface/PIService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/polypheny/db/languages/LanguageManager.java b/core/src/main/java/org/polypheny/db/languages/LanguageManager.java index cfbaeeb237..5a7623c401 100644 --- a/core/src/main/java/org/polypheny/db/languages/LanguageManager.java +++ b/core/src/main/java/org/polypheny/db/languages/LanguageManager.java @@ -184,7 +184,7 @@ public List anyPrepareQuery( QueryContext context, Statem implementationContexts.add( new ImplementationContext( implementation, parsed, statement, null ) ); } catch ( Throwable e ) { - log.warn( "Caught exception: ", e ); + log.warn( "Caught exception: ", e ); // TODO: This should not log in all cases, at least not with stacktrace if ( transaction.isAnalyze() ) { transaction.getQueryAnalyzer().attachStacktrace( e ); } diff --git a/plugins/proto-interface/src/main/java/org/polypheny/db/protointerface/PIService.java b/plugins/proto-interface/src/main/java/org/polypheny/db/protointerface/PIService.java index 4cdef5b900..05cc7b3671 100644 --- a/plugins/proto-interface/src/main/java/org/polypheny/db/protointerface/PIService.java +++ b/plugins/proto-interface/src/main/java/org/polypheny/db/protointerface/PIService.java @@ -224,7 +224,7 @@ private void handleMessages() throws IOException, ExecutionException, Interrupte handle.join(); handle = null; Response r = response.get(); - if ( r.getTypeCase() == Response.TypeCase.DISCONNECT_RESPONSE || r.getTypeCase() == Response.TypeCase.ERROR_RESPONSE ) { + if ( r.getTypeCase() == Response.TypeCase.DISCONNECT_RESPONSE ) { throw new EOFException(); } response = null;