Skip to content

Commit 126b80a

Browse files
authored
Merge pull request #32 from viniciusam/bugfix/hang_on_oracle_error
Halt client threads on database errors
2 parents d0adb23 + 2cf7b66 commit 126b80a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/io/github/utplsql/cli/RunCommand.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public int run() throws Exception {
135135
} catch (SQLException e) {
136136
System.out.println(e.getMessage());
137137
returnCode[0] = Cli.DEFAULT_ERROR_CODE;
138+
executorService.shutdownNow();
138139
}
139140
});
140141

@@ -158,6 +159,7 @@ public int run() throws Exception {
158159
} catch (SQLException | FileNotFoundException e) {
159160
System.out.println(e.getMessage());
160161
returnCode[0] = Cli.DEFAULT_ERROR_CODE;
162+
executorService.shutdownNow();
161163
} finally {
162164
if (fileOutStream != null)
163165
fileOutStream.close();

0 commit comments

Comments
 (0)