From 75849decf2109cf2a0ebff68866bd92119bb690a Mon Sep 17 00:00:00 2001 From: Hanzhen Yi Date: Fri, 4 May 2018 14:20:59 -0700 Subject: [PATCH] Fix snippets --- .../spanner/snippets/DatabaseAdminClientSnippets.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseAdminClientSnippets.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseAdminClientSnippets.java index 9e01b445064b..5afb07ba5f72 100644 --- a/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseAdminClientSnippets.java +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseAdminClientSnippets.java @@ -74,9 +74,9 @@ public Database createDatabase(String instanceId, String databaseId) { Database db; try { db = op.get(); - } catch (Exception e) { - throw SpannerExceptionFactory.newSpannerException(e); - } + } catch (ExecutionException | InterruptedException e) { + throw e.getCause(); + } // [END createDatabase] return db; }