Permalink
Browse files

More validation for config file for sqllite

  • Loading branch information...
1 parent 21a9f86 commit 019c85ee36a4c670ce03db5b5c244bfd4918def8 @lprichar lprichar committed Feb 27, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/driver/sqlite3.js
View
4 lib/driver/sqlite3.js
@@ -76,6 +76,10 @@ exports.connect = function(config, callback) {
if (config.db) {
callback(null, new Sqlite3Driver(config.db));
} else {
+ if (typeof(config.filename) === 'undefined') {
+ console.error('filename is required in database.json');
+ return;
+ }
var db = new sqlite3.Database(config.filename, mode);
db.on("error", callback);
db.on("open", function() {

0 comments on commit 019c85e

Please sign in to comment.