Skip to content

Commit

Permalink
[hotfix] [sql-client] Wrap exceptions thrown during environment insta…
Browse files Browse the repository at this point in the history
…nce creation
  • Loading branch information
twalthr committed Jul 23, 2018
1 parent d850fde commit 7308874
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ public ClusterDescriptor<T> createClusterDescriptor() throws Exception {
}

public EnvironmentInstance createEnvironmentInstance() {
return new EnvironmentInstance();
try {
return new EnvironmentInstance();
} catch (Throwable t) {
// catch everything such that a wrong environment does not affect invocations
throw new SqlExecutionException("Could not create environment instance.", t);
}
}

public Map<String, TableSource<?>> getTableSources() {
Expand Down

0 comments on commit 7308874

Please sign in to comment.