提交 026ac3cfab416f4c2f5a2bb82818de7285ece5f4

作者 Nick Baugh
1 个父辈 c2c25268

testing knex error catching

正在显示 2 个修改的文件 包含 6 行增加3 行删除
1 1
2 // # boot - knex 2 // # boot - knex
3 3
4 -var knex = require('knex')  
5 -  
6 exports = module.exports = function(logger, settings) { 4 exports = module.exports = function(logger, settings) {
7 - return knex(settings.knex) 5 + var knex = require('knex')(settings.knex)
  6 + knex.on('error', function(err) {
  7 + logger.error(err)
  8 + })
  9 + return knex
8 } 10 }
9 11
10 exports['@singleton'] = true 12 exports['@singleton'] = true
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 "connect-redis": "~2.0.0", 20 "connect-redis": "~2.0.0",
21 "express-session": "^1.2.1", 21 "express-session": "^1.2.1",
22 "knex": "^0.6.13", 22 "knex": "^0.6.13",
  23 + "mariasql": "^0.1.21",
23 "merge-defaults": "^0.1.0", 24 "merge-defaults": "^0.1.0",
24 "mongoose": "~3.8.7", 25 "mongoose": "~3.8.7",
25 "mongoose-json-select": "^0.2.1", 26 "mongoose-json-select": "^0.2.1",
注册登录 后发表评论