提交 026ac3cfab416f4c2f5a2bb82818de7285ece5f4

作者 Nick Baugh
1 个父辈 c2c25268

testing knex error catching

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