diff --git a/lib/cube/server.js b/lib/cube/server.js index eabbf400..2189002c 100644 --- a/lib/cube/server.js +++ b/lib/cube/server.js @@ -143,7 +143,11 @@ module.exports = function(options) { // Connect to mongodb. util.log("starting mongodb client"); database.open(options, function (error, db) { - if (error) throw error; + if (error) { + util.log("mongo exception: " + error); + util.log(error.stack); + process.exit(1) + } server.register(db, endpoints); meta = require("./event").putter(db); util.log("starting http server on port " + options["http-port"]);