Repository: prestodb/presto
Issue: Uncategorized error for Raptor system table

The catch block needs to be `catch (SQLException | DBIException e)`

```
org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: ...
    at org.skife.jdbi.v2.DBI.open(DBI.java:230)
    at com.facebook.presto.raptor.systemtables.ShardMetadataRecordCursor.getTableIds(ShardMetadataRecordCursor.java:321)
    at com.facebook.presto.raptor.systemtables.ShardMetadataRecordCursor.<init>(ShardMetadataRecordCursor.java:103)
    at com.facebook.presto.raptor.systemtables.ShardMetadataSystemTable.cursor(ShardMetadataSystemTable.java:57)
    at com.facebook.presto.connector.system.SystemRecordSetProvider$1.cursor(SystemRecordSetProvider.java:118)
    at com.facebook.presto.split.MappedRecordSet.cursor(MappedRecordSet.java:53)
    at com.facebook.presto.spi.RecordPageSource.<init>(RecordPageSource.java:37)
    at com.facebook.presto.split.RecordPageSourceProvider.createPageSource(RecordPageSourceProvider.java:42)
    at com.facebook.presto.split.PageSourceManager.createPageSource(PageSourceManager.java:48)
    at com.facebook.presto.operator.ScanFilterAndProjectOperator.createSourceIfNecessary(ScanFilterAndProjectOperator.java:287)
    at com.facebook.presto.operator.ScanFilterAndProjectOperator.isFinished(ScanFilterAndProjectOperator.java:180)
    at com.facebook.presto.operator.Driver.processInternal(Driver.java:377)
    at com.facebook.presto.operator.Driver.processFor(Driver.java:303)
    at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:575)
    at com.facebook.presto.execution.TaskExecutor$PrioritizedSplitRunner.process(TaskExecutor.java:505)
    at com.facebook.presto.execution.TaskExecutor$Runner.run(TaskExecutor.java:640)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
```


Changed files:
presto-raptor/src/main/java/com/facebook/presto/raptor/systemtables/ShardMetadataRecordCursor.java

diff --git a/presto-raptor/src/main/java/com/facebook/presto/raptor/systemtables/ShardMetadataRecordCursor.java b/presto-raptor/src/main/java/com/facebook/presto/raptor/systemtables/ShardMetadataRecordCursor.java
index 7011abd113..68fa9ca885 100644
--- a/presto-raptor/src/main/java/com/facebook/presto/raptor/systemtables/ShardMetadataRecordCursor.java
+++ b/presto-raptor/src/main/java/com/facebook/presto/raptor/systemtables/ShardMetadataRecordCursor.java
@@ -27,6 +27,7 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import io.airlift.slice.Slice;
 import org.skife.jdbi.v2.IDBI;
+import org.skife.jdbi.v2.exceptions.DBIException;
 
 import java.sql.Connection;
 import java.sql.PreparedStatement;
@@ -181,7 +182,7 @@ public class ShardMetadataRecordCursor
             completedBytes += resultSetValues.extractValues(resultSet, ImmutableSet.of(getColumnIndex(SHARD_METADATA, SHARD_UUID)));
             return true;
         }
-        catch (SQLException e) {
+        catch (SQLException | DBIException e) {
             throw metadataError(e);
         }
     }
@@ -275,7 +276,7 @@ public class ShardMetadataRecordCursor
                     tupleDomain);
             return statement.executeQuery();
         }
-        catch (SQLException e) {
+        catch (SQLException | DBIException e) {
             close();
             throw metadataError(e);
         }
@@ -328,7 +329,7 @@ public class ShardMetadataRecordCursor
                 tableIds.add(resultSet.getLong("table_id"));
             }
         }
-        catch (SQLException e) {
+        catch (SQLException | DBIException e) {
             throw metadataError(e);
         }
         return tableIds.build().iterator();