diff options
Diffstat (limited to 'src/mongo/shell/db.js')
-rw-r--r-- | src/mongo/shell/db.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js index d656a7703f8..e9572e7d8cb 100644 --- a/src/mongo/shell/db.js +++ b/src/mongo/shell/db.js @@ -1261,7 +1261,7 @@ DB.prototype.getUser = function(username, args) { } if (res.users.length == 0) { - throw Error("User " + username + "@" + db.getName() + " not found"); + return null; } return res.users[0]; } @@ -1388,7 +1388,7 @@ DB.prototype.getRole = function(rolename, args) { } if (res.roles.length == 0) { - throw Error("Role " + rolename + "@" + db.getName() + " not found"); + return null; } return res.roles[0]; } |