aboutsummaryrefslogtreecommitdiffhomepage
path: root/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'initializers')
-rw-r--r--initializers/checker.js4
-rw-r--r--initializers/database.js3
2 files changed, 2 insertions, 5 deletions
diff --git a/initializers/checker.js b/initializers/checker.js
index 9a7d04ed4..ec7bc0ad2 100644
--- a/initializers/checker.js
+++ b/initializers/checker.js
@@ -36,9 +36,7 @@ function createDirectoriesIfNotExist () {
36 try { 36 try {
37 mkdirp.sync(path.join(__dirname, '..', dir)) 37 mkdirp.sync(path.join(__dirname, '..', dir))
38 } catch (error) { 38 } catch (error) {
39 // Do not use logger 39 throw new Error('Cannot create ' + path + ':' + error)
40 console.error('Cannot create ' + path + ':' + error)
41 process.exit(0)
42 } 40 }
43 } 41 }
44} 42}
diff --git a/initializers/database.js b/initializers/database.js
index 6e3f11df3..a917442ec 100644
--- a/initializers/database.js
+++ b/initializers/database.js
@@ -16,8 +16,7 @@ var database = {
16function connect () { 16function connect () {
17 mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname) 17 mongoose.connect('mongodb://' + host + ':' + port + '/' + dbname)
18 mongoose.connection.on('error', function () { 18 mongoose.connection.on('error', function () {
19 logger.error('Mongodb connection error.') 19 throw new Error('Mongodb connection error.')
20 process.exit(0)
21 }) 20 })
22 21
23 mongoose.connection.on('open', function () { 22 mongoose.connection.on('open', function () {