Skip to content

Commit

Permalink
better error message on bad conf
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Jun 19, 2013
1 parent 2884029 commit 5b0099d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ var toConnectionString = function(conf) { // backwards compat config map (use a

var parseConfig = function(cs) {
if (typeof cs === 'object' && cs) return toConnectionString(cs);

if (typeof cs !== 'string') throw new Error('connection string required'); // to avoid undef errors on bad conf
cs = cs.replace(/^\//, '');

if (cs.indexOf('/') < 0) return parseConfig('127.0.0.1/'+cs);
Expand Down

0 comments on commit 5b0099d

Please sign in to comment.