Description
The current db.auth page doesn't indicate that the function returns 0 if the command fails. Nor does it state that this function will never throw an exception.
We should update this page to explicitly state that the command catches any exception and return 0 to indicate that it has failed.
db.auth
|
function () {
|
var ex;
|
try {
|
this._authOrThrow.apply(this, arguments);
|
} catch (ex) {
|
print(ex);
|
return 0;
|
}
|
return 1;
|
}
|