From d68b57511cc6d5fd1388d2db2ab2d38548f2d6d5 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Mon, 18 Jun 2012 05:18:36 +0400 Subject: [PATCH] More helpful exception message --- src/clojure/monger/core.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clojure/monger/core.clj b/src/clojure/monger/core.clj index 821ef68..e6a34be 100644 --- a/src/clojure/monger/core.clj +++ b/src/clojure/monger/core.clj @@ -216,7 +216,7 @@ (set-connection! conn) (when (and user pwd) (when-not (authenticate (.getName db) user pwd) - (throw (IllegalArgumentException. (format "Could not authenticate. Either database name or credentials are invalid. Database name: %s, username: %s" (.getName db) user))))) + (throw (IllegalArgumentException. (format "Could not authenticate with MongoDB. Either database name or credentials are invalid. Database name: %s, username: %s" (.getName db) user))))) ;; only do this *after* we authenticated because set-db! will try to set up a default GridFS instance. MK. (when db (set-db! db))