From 3df86fdab3f38c2374071d7494f5fc78b3a74964 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 23 Apr 2017 16:40:49 +0900 Subject: [PATCH] Remove needless try-catch --- src/index.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 04c4226aa..fe5c4b944 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,13 +110,9 @@ async function init(): Promise { // Try to connect to MongoDB let mongoDBLogger = new Logger('MongoDB'); - try { - const db = require('./db/mongodb').default; - mongoDBLogger.info('Successfully connected'); - db.close(); - } catch (e) { - throw e; - } + const db = require('./db/mongodb').default; + mongoDBLogger.info('Successfully connected'); + db.close(); return config; }