diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-23 16:40:49 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-23 16:40:49 +0900 |
| commit | 3df86fdab3f38c2374071d7494f5fc78b3a74964 (patch) | |
| tree | eed2602a02923032b3a343e87633791423d463fd /src | |
| parent | Refactoring (diff) | |
| download | misskey-3df86fdab3f38c2374071d7494f5fc78b3a74964.tar.gz misskey-3df86fdab3f38c2374071d7494f5fc78b3a74964.tar.bz2 misskey-3df86fdab3f38c2374071d7494f5fc78b3a74964.zip | |
Remove needless try-catch
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/index.ts b/src/index.ts index 04c4226aa1..fe5c4b9448 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,13 +110,9 @@ async function init(): Promise<Config> { // 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; } |